Ios 想要在viewcontroller中弹出菜单吗

Ios 想要在viewcontroller中弹出菜单吗,ios,objective-c,uiviewcontroller,popup,Ios,Objective C,Uiviewcontroller,Popup,-(iAction)弹出窗口:(id)发送者 { } 获取此视图时,单击leftnavigationbarbutton时,我希望在该视图控制器内有一个弹出菜单 想要这个视图。。。。 你可以试试presentViewController,我在我的一个应用程序中试试 1) 将其放置在viewDidLoad()中 2) 这是一个点击事件 Popup *v2 = [[Popup alloc]initWithNibName:@"Popup" bundle:nil]; v2.modalTransit

-(iAction)弹出窗口:(id)发送者 {

}

获取此视图时,单击leftnavigationbarbutton时,我希望在该视图控制器内有一个弹出菜单

想要这个视图。。。。

你可以试试presentViewController,我在我的一个应用程序中试试

1) 将其放置在viewDidLoad()中

2) 这是一个点击事件

Popup *v2 = [[Popup   alloc]initWithNibName:@"Popup" bundle:nil];

v2.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

[self presentViewController:v2 animated:YES completion:nil];
3) 根据需要使用UIViewController弹出窗口


玩得开心

很抱歉没有问题,但我对发展还是新手。你能告诉我什么是Nibname文件吗。我正在使用故事板。没有看到任何东西。NibName指的是viewController的xib名称,因为我为所有viewController使用自定义xib,对不起,伙计,我这边没有更多帮助,因为我从未使用情节提要进行应用程序开发。祝你好运
  self.modalPresentationStyle = 
   UIModalPresentationCurrentContext;
Popup *v2 = [[Popup   alloc]initWithNibName:@"Popup" bundle:nil];

v2.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

[self presentViewController:v2 animated:YES completion:nil];