开发者

simple UISearchBar and UITextView app

I'd like to see a tutorial which shows a UISearchBar as well as a UITextView where you type som开发者_JAVA技巧ething in the UISearchBar and it appears in the UITextView as you type it.

I've pulled my hair out over this and am now redesigning my app with a text field and button because I can't get my head around UISearchBarDelegate and how it integrates with UISearchBar. Apple has an official example, except that it's very complicated. My post detailing my frustrations can be found here: http://www.iphonedevsdk.com/forum/ip...html#post12603

If anyone could do this screencast, I would highly appreciate it!


Implement the UISearchBar delegate method: -(void)searchBar :(UISearchBar*)theSearchBar textDidChange :(NSString*)searchText

then just use myTextView.text = searchBar.text whenever that method gets called.

Tariq

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜