LoginSignup
6
6

More than 5 years have passed since last update.

iOS8 の iPad で actionSheet から presentViewController する

Posted at

iOS8 / iPad では、actionSheet の delegate 内から presentViewController でビューコントローラを表示させることができません。具体的には、以下のようなエラーだけがでて何も起こりません。

Warning: Attempt to present <...> on <...> which is already presenting 

ワークアラウンドとして、以下のように presentViewController: を遅延実行させると正常動作します。

dispatch_async(dispatch_get_main_queue(), ^ {
    [self presentViewController:vc animated:YES completion:nil];
});

参考: Presenting a view controller modally from an action sheet's delegate in iOS8

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6