我有一个应用程序,用户可以从选择轮中选择他们的国家。出现警报并要求他们确认更改。如果他们确认,它会将他们带到不同的视图,然后他们可以从类别列表中选择以显示信息......
类别列表嵌入在导航控制器中,以方便从详细视图“返回”移动到类别选择视图。
整个应用程序嵌入在标签栏控制器中。
它工作正常(在选择他们的国家后,他们被带到选择类别屏幕),除了现在选择类别失去了与选项卡栏控制器的连接,并且无法返回应用程序的其他部分。
这是我的警报视图代码:
- (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");
}
}