title: iOS 7 doesn't show cancel button of search bar in navigation bar
body: <p>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 6, it works.</p>
  
  <p>The search bar is in the title view of the navigation bar and the cancel button should be shown if the search bar becomes the first responder:</p>
  
  <p><strong>iOS 7</strong></p>
  
  <p><img src="https://i.stack.imgur.com/P6AKq.png" alt="enter image description here"></p>
  
  <p><strong>iOS 6</strong></p>
  
  <p><img src="https://i.stack.imgur.com/0QpLT.png" alt="enter image description here"></p>
  
  <p>In an isolated test case, the code is very simple:</p>
  
  <pre><code>@interface MyViewController : UITableViewController&lt;UISearchBarDelegate&gt;
  
  @property (nonatomic) IBOutlet UISearchBar* searchBar;
  
  @end
  
  
  @implementation MyViewController
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      self.navigationItem.titleView = self.searchBar;
  }
  
  - (void) searchBarTextDidBeginEditing: (UISearchBar*) searchBar {
      [searchBar setShowsCancelButton: YES animated: YES];
  }
  
  @end
  </code></pre>
  
  <p>Is this a deliberate change in iOS 7 that I missed in the documentation? If yes, what is supposed to be the alternative?</p>
  
  <p>If not, have I made a mistake in my code?</p>