1
我已經有了一個應用程序,用戶可以從選取器選擇他們的國家。警報出現並要求他們確認更改。如果他們確認,則會將他們轉到不同的視圖,然後他們可以從類別列表中選擇以顯示信息...如何正確地使用故事板與嵌入式選項卡欄和導航控制器相關?
將類別列表嵌入導航控制器中以便於從詳細視圖中移動「返回「到類別選擇視圖。
整個應用程序嵌入在選項卡欄控制器中。
它工作正常(選擇他們的國家後,他們被帶到選擇類別屏幕),除非現在選擇類別已經失去了與選項卡欄控制器的連接,並且沒有辦法返回到應用程序的其他部分。
這裏是我的alertView代碼:
- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 0) {
NSLog(@"ok");
//I tried the following but it doesn't do anything
//SelectCategory *switchtocategory = [[SelectCategory alloc] init];
//[self.navigationController pushViewController:switchtocategory animated:YES];
//the following works but loses the tab/navigation bars
[self performSegueWithIdentifier: @"GoToCategory" sender: self];
} else {
NSLog(@"cancel");
}
}