簡體   English   中英

在情節提要/視圖控制器之間切換

[英]Switching between storyboards/view controllers

因此,我是第一次制作iPad應用程序,現在我有一個視圖控制器,其按鈕顯示在情節提要上,而我要做的就是單擊某個按鈕時,新屏幕。

因此,我為第二個屏幕創建了第二個viewcontroller類,並為按鈕創建了IB Action方法,但該方法為空,因為我不知道如何實現它。 那我該怎么做呢?

試試吧....

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
// iPad-specific interface here
LBAlertLoginViewController *lbAlertLoginVc = [[LBAlertLoginViewController alloc]initWithNibName:@"LBAlertLoginViewController_iPad" bundle:nil];
[self.navigationController pushViewController:lbAlertLoginVc animated:YES];
[lbAlertLoginVc release];
}
else
{
// iPhone and iPod touch interface here
LBAlertLoginViewController *lbAlertLoginVc = [[LBAlertLoginViewController alloc]initWithNibName:@"LBAlertLoginViewController_iPhone" bundle:nil];
[self.navigationController pushViewController:lbAlertLoginVc animated:YES];
[lbAlertLoginVc release];
}

希望我能幫上忙。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM