我有一个UISearchBar
. 我希望键盘在用户点击搜索后立即消失……我确实尝试resignFirstResponder
过,但没有奏效。任何帮助,将不胜感激
- (void)viewDidLoad {
[super viewDidLoad];
self.title = NSLocalizedString(@"Songs", @"Search for songs");
NSMutableArray *array = [[NSArray alloc]initWithObjects: @"Book_1", @"Book 2", @"Book _ 4", nil];
self.booksArray = array;
[array release];
search.delegate=self;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
谢谢 TC