I programmatically added a UISearchBar in the view, did some initial setup. However, when I tap the search bar, the keyboard is not showing up. I looked up some question on this site, and none seems working for me.
Here is the code snippets I used to setup the search bar
self.searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(origin.x,origin.y,width,height)];
self.searchBar.searchBarStyle = UISearchBarStyleDefault;
self.searchBar.translucent = YES;
self.searchBar.barTintColor = [UIColor whiteColor];
...
[self.searchBar setDelegate:self];
[self.view addSubView:self.searchBar];
Any suggestions on fix this? Thanks!