2012-06-21 34 views
0

如何在選項卡式應用程序中構建登錄視圖?我是ios開發新手。我通過互聯網閱讀了很多,但沒有人只是發佈我能理解的代碼。任何幫助表示讚賞=)。登錄在選項卡式應用程序中查看

+0

你的做法是不正確的。不要試圖找到代碼。嘗試找到一個教程或指南。 – samfisher

+0

你是對的!感謝您的評論。 – coolhongly

回答

0

最後我這樣做是爲了解決我的問題:

我的RootViewController的是我的註冊看,然後我設置一個按鈕,實現自定義賽格瑞:

-(IBAction)button { 
    NSLog(@"username: %@, password: %@, passwordrt: %@", username.text, password.text, passwordrt.text); 
    [self performSegueWithIdentifier:@"tabBar" sender:self]; 
} 
0

這裏是一個相關的帖子在這裏:Adding login screen in front of Cocoa Touch Tab Bar Application for IOS

我寧願寫一篇這樣的壽。

[window setRootController:tabBarCon]; 
if (notLogedIn) { 
    loginViewController = [[InitialScreenViewController alloc] init]; 
    [tabBarCon.view addSubview:loginViewController.view]; 
} 
[window makeKeyAndVisible]; 
return YES; 

- (bool)notLoggedIn { 
    //check if there is any sessions exists in local storage 
} 

如果您的內容與用戶帳戶相關,請記住在登錄後實施重新加載內容的方法。

相關問題