2

UITabBarController複数UINavigationControllerの を含むを表示する Pythonista スクリプトに取り組んでいますUITableViewController。ある時点で を表示する必要がありますがUIAlertController、それを提示しようとしたすべてのメソッドは、アプリをクラッシュさせるか、UIAlertControllerをナビゲーション スタックにプッシュします。

私のコード:

from objc_util import *
from UIKit import *

alert = UIAlertController.alertControllerWithTitle_message_preferredStyle_('Title', 'Message', 0)
def alertActionCancel(sender):
  print 'Cancelled!'
alertActionCancelBlock = ObjCBlock(alertActionCancel, None, [c_void_p])
retain_global(alertActionCancelBlock)
alert.addAction_(UIAlertAction.actionWithTitle_style_handler_('Cancel', 1, alertActionCancelBlock))
myTableViewController.presentViewController_animated_completion_(alert, True, None) # This line crashes Pythonista

事前に感謝します。どんな助けでも大歓迎です。

4

1 に答える 1

0

問題は、iPad でアクション シートを設定せずに表示しようとしたことでしたpopoverPresentationController

于 2016-01-31T00:19:58.773 に答える