In an app that\'s supposed to run on iOS 6 and iOS 7, the cancel button of the search bar embedded in the navigation bar is not shown anymore if the app is run on iOS 7. On iOS
iOS 7 is different with iOS 6 in navigation bar, so if you want to show UISearch bar in navigation bar,you can try this:
put your UISearchbar on a UIView like this[self.searchView addSubview self.searchBar]
, and set the navigationbar's titleView to your searchView like thisself.navagitioncontroller.navigationItem.titleView = self.searchView
Hope it works for you