如何将这个Objective-C代码放在按钮动作中?

时间:2015-12-22 05:51:34

标签: ios objective-c

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];
}

1 个答案:

答案 0 :(得分:1)

只需在

中添加
templates

请查看以下文档: Apple Doc