title: How to use UIAlertController to replace UIActionSheet?
body: <p>I am maintaining an old iOS project which based on SDK 6.0.</p>
  
  <p>A method on this project called </p>
  
  <p><code>-(void) showComboBox:(UIView*)view:withOptions:(NSDictionary*)options</code></p>
  
  <p>is used to show a combo box. To achieve the goal, it used UIActionSheet, which is deprecated on iOS8. </p>
  
  <p>My solution is like this:</p>
  
  <pre><code>        if (floor(NSFoundationVersionNumber) &gt; NSFoundationVersionNumber10_8) {
          UIAlertController* alertController = [UIAlertController 
             alertControllerWithTitle:@"title" 
             message:@"message" 
             preferredStyle:UIAlertControllerStyleActionSheet];
  
          UIAlertAction* item = [UIAlertAction actionWithTitle:@"item" 
             style:UIAlertActionStyleDefault 
             handler:^(UIAlertAction *action) {
              //do something here 
              //inform the selection to the WebView 
              ...
              [alertController dismissViewControllerAnimated:YES completion:nil];
          }];
  
          UIAlertAction* cancelAction = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
              [alertController dismissViewControllerAnimated:YES completion:nil];
          }];
  
          [alertController addAction:item];
          [alertController addAction:cancelAction];
          //I am not sure whether it's the right way
          if ([view.nextResponder isKindOfClass:UIViewController.class]) {
              UIViewController* vc = (UIViewController*)view.nextResponder;
              [vc presentViewController:alertController animated:YES completion:nil];
          }
  </code></pre>
  
  <p>Is that a proper solution?</p>
  
  <p>This is what I mostly <strong>concern about</strong>: UIAlertController needs to be added to a UIViewController but I can only get the pointer of the UIView, so I used view.nextResponder to get what I want, but it's that a good way? </p>