Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?

I’ve been tinkering around the last days, creating a multi-line UITextView. I wanted a SMS-app like experience and needed a growing (and shrinking) textView. I tried using three20′s TTTextEditor, but it disables the bounces of the scroll (which is ugly) and has this big white margin on the bottom when you scroll down manually. So I needed a UITextView which grows/shrinks with the text always on th
TextFieldのPlaceholderって便利ですよね。 TextViewでも同じようにできるかと思ってたら...できない! 「Placeholder in UITextView」でGoogle先生に聞いてみると、ばっちりの回答が。 iphone - Placeholder in UITextView - Stack Overflow UIPlaceHolderTextView.m <Interface Builderを使う場合> - (void)awakeFromNib { [super awakeFromNib]; [self setPlaceholder:@"placeholder"];//ここの文字列を置き換える。 [self setPlaceholderColor:[UIColor lightGrayColor]]; [[NSNotificationCenter defaul
テキストを入力する為のコントロールにはUITextFieldがあります。これは1行しか入力できないコントロールなのでURL等を指定する時に使います。 複数の行を入力させるにはUITextViewを使います。 メモ帳のようなアプリケーションではUITextViewを使います。 UITextFieldは1行の入力なので、仮想キーボード上でEnterキーを押せば編集が完了したことが分かりますが、UITextViewのように複数行を編集させるコントロールの場合、Enterキーは改行を意味することになります。 そのため、編集の開始、終了等を明確にする為にdelegateを使ってアプリケーションに通知する仕組みが備わっています。 - (BOOL) textViewShouldBeginEditing: (UITextView*) textView (戻り値) BOOL YES or NO 編集を開始し
Copyright (C) iPhoneアプリ開発備忘録 All rights reserved. ブログ内で記したコード、内容の正確性は保証いたしません。 記載内容を実装したことにより発生した不具合・損害等の責任は一切負いません。 表示領域の横幅と文字の長さに応じて、TabileViewCellの高さを調節する方法。 - (CGFloat)tableView:(UITableView*)tableView heightForRowAtIndexPath:(NSIndexPath*)indexPath { UITableViewCell *cell = [self tableView:self.tableView cellForRowAtIndexPath:indexPath]; CGSize bounds = CGSizeMake(self.tableView.frame.size.wi
久しぶりにiPhoneネタです。 UITextFieldはいろいろ気が利いていて使いやすのですが、 複数行の入力には対応していないみたいです。(残念) 複数行となると、UITextViewを使います。 UITextViewですと、UITextFieldのようにReturnKeyで入力完了を受け取ることができないので、ナビゲーションバーに「完了」ボタン等を付けていました。UITextFieldと同じ動きがクライアントの要求だったのでとても困っていたのですが、すてきな記事を見つけました。 How to Dismiss the Keyboard when using a UITextView ポイントは、UITextViewDelegateの - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)rang
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く