-2
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];
}
- (IBAction爲)去:(ID)發送; – alideny
只是如何從按鈕調用此代碼? – alideny
這可能有所幫助:http://stackoverflow.com/questions/5843427/how-do-you-add-an-action-to-a-button-programmatically-in-xcode。在按鈕事件中,您可以粘貼您所需的功能代碼。 – Mrunal