任何人都可以遇到類似的問題嗎? 也許我錯過了什麼適當的行動?首先嚐試在的AppDelegate在的ViewController運行這段代碼現在具有相同..如何把這段代碼放在按鈕動作中?
或者,也許有人知道如何把這個代碼在按鈕的動作?
也許有人知道,如何使用UIPresentationPopoverController來呈現這個ActionsViewController?
- (void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
ActionsViewController *actionsViewController = [AppLibrary createActionsViewController];
actionsViewController.actionDelegate = self;
actionsViewController.supportedActionTypes = @[[[SupportedAction alloc] initWithActionType:ActionTypeEdit mediaTypes:@[kTypePNG]]];
[actionsViewController setWhitelistedSubTypes:@[@"adjust", @"filter", @"healing"]];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
self.actionsNavigationController = [[UINavigationController alloc] initWithRootViewController:actionsViewController];
[self presentViewController:self.actionsNavigationController animated:YES completion:nil];
}
}
警告:試圖提出在<視圖控制器:>誰的觀點是不是在窗口層次! –
alideny
請編輯代碼以使其更具可讀性 – Gihan
'who'是self.actionsNavigationController? – arturdev