我有一个UIImageController,它的项目以这种方式添加:
`UIMenuController * menuController = [UIMenuController sharedMenuController];
NSString *selfMenuItemTitle = NSLocalizedString(@"Self", @"Self");
UIMenuItem *selfMenuItem = [[UIMenuItem alloc] initWithTitle:selfMenuItemTitle action:@selector(setPrivacySelf:)];
NSString *followersMenuItemTitle = NSLocalizedString(@"Followers", @"Followers");
UIMenuItem *followersMenuItem = [[UIMenuItem alloc] initWithTitle:followersMenuItemTitle action:@selector(setPrivacyFollower:)];
NSString *everyMenuItemTitle = NSLocalizedString(@"Everyone", @"Everyone");
UIMenuItem *everyMenuItem = [[UIMenuItem alloc] initWithTitle:everyMenuItemTitle action:@selector(setPrivacyEvery:)];
[menuController setMenuItems:@[selfMenuItem,followersMenuItem,everyMenuItem]];
//CGPoint location = [sender locationInView:self.view];
CGRect menuLocation = CGRectMake(200, 100,0 , 0);
[menuController setTargetRect:menuLocation inView:[self view]];
[menuController setMenuVisible:YES animated:YES];`
这些项目水平显示在一行中。如何在单独的行中显示每个项目并创建垂直菜单? 我找到了:https://github.com/kolyvan/kxmenu 和http://code4app.net/category/menu那些包含这类菜单的类,Xcode没有默认解决方案吗?