I have a UIViewController in which I want to show a tableview with the serchBar.
//viewDidLoad _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,
I have applied your code,, It works fine for me,, Just hide you navigation bar and start the search bar from y = 20, instead of y = 0;