2011-06-09 117 views
0

我的應用程序以兩個按鈕「Enter」開始& &「登錄」。通過選擇回車,模塊化地顯示標籤欄控制器。這是一個糟糕的設計? UITabBarController

但是,通過選擇登錄用戶取消幾個視圖,然後我想顯示選項卡欄控制器。

@interface lifestats_ViewController :UIViewController < UITabBarControllerDelegate> 
{ 

    UITabBarController *tabBarController; 
     RootTabView *view1; 
     TabView *view2; 
} 
-(IBAction)Enter:(id)sender; 

-(IBAction)Login:(id)sender; 
@end 

@implementation lifestats_ViewController 
{ 

-(IBAction)Enter: 

{ 
//initialize tab bar controller 
//present it modally 
} 
} 
@end 

但是,登錄後,我認爲從lifestats_ViewController(IBAction)調用方法將是不好的做法輸入:.我認爲我最好的選擇是製作另一個視圖並用Tab Bar Controller初始化它。

回答

0

我不是專家,但憑藉我迄今的經驗,我可以建議,這不是最好的設計。可能你應該採取以下的方式。

將您的標籤欄控制器添加到應用程序的窗口。用導航控制器以模態方式顯示標籤欄控制器上的視圖(控制器)。如果用戶選擇輸入,則關閉該控制器,否則導航到其他兩個視圖控制器。我用過這麼多次。

+0

非常感謝,我同意。 – 2011-06-12 16:15:24

相關問題