【发布时间】:2014-06-08 07:07:36
【问题描述】:
我有一个正确配置和运行的UITableViewController。假设这个控制器的类被称为:tableViewController。在这张桌子上,我有一个 UIBarButton 出现在这样创建的视图的左侧:
UIBarButtonItem *userProfile = [[UIBarButtonItem alloc] initWithTitle:@"Profile" style:UIBarButtonItemStylePlain target:self action:@selector(userProfileGo:)];
self.navigationItem.leftBarButtonItem = userProfile;
self.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor];
我已经创建了另一个名为 userProfileViewController 的视图控制器,用户可以在其中访问他们的配置文件,它已经配置并以这种方式推送到 userProfileGo:
[self performSegueWithIdentifier: @"userProfile" sender: self];
我想要做的是当点击 tableViewController 作为一个小窗口时显示用户配置文件 ViewController
这张图代表我的目标:
有没有办法做到这一点?
【问题讨论】:
-
您可以使用模态样式来呈现它。
-
使用滑动控制器怎么样?变得更容易处理..
-
+1 to REMenu 我已经使用过它,并且与您尝试做的非常相似。
-
或在 UIButton 上使用 popoverViewController。这不是 Windows,没有人想在他们的 iPhone 上看到下拉菜单。
标签: ios objective-c model-view-controller xcode5 uitableview