2013-11-15 50 views
0

彈出菜單 - (IBAction爲)彈出:(ID)發送 {要在視圖 - 控制

NomadPopupViewController *detailViewController = [[NomadPopupViewController alloc] init]; 
[self presentPopupViewController:detailViewController animationType:MJPopupViewAnimationFade]; 
//[self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationFade]; 

}

聞聽此事的看法,我想這個視圖控制器內的彈出式菜單,當我點擊leftnavigationbarbutton

希望這一觀點....

回答

0

你可以嘗試presentViewController,我嘗試在我的應用程序

1之一)把這個在viewDidLoad中()

self.modalPresentationStyle = 
    UIModalPresentationCurrentContext; 

2)本中單擊事件

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

v2.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; 

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

3)讓您的UIViewController彈出爲您想要顯示

完成享受!

+0

對不起noob問題,但我是新的發展。你能告訴我什麼是Nibname文件。我正在使用故事板。沒有看到任何東西。 – Vishal

+1

NibName指的是viewController的xib名稱,因爲我爲所有viewController定製xib,對不起,兄弟沒有更多的幫助從我身邊bcoz我從來沒有使用故事板的應用程序開發..好運 – mohitdream4u

相關問題