segue后标签栏消失

时间:2016-01-13 22:49:57

标签: ios objective-c uinavigationcontroller uitabbarcontroller

在阅读有关此问题的堆栈溢出中的几个主题后,可能有人会发现我的错误在哪里:目标控制器中的标签栏消失。 我的源视图控制器是一个Table视图控制器。单击单元格时有一个segue到导航视图控制器链接到目标视图控制器。 segue是模态的。

表视图控制器:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSLog(@"cell selected");

//doing some thing and call to the segue..

[self performSegueWithIdentifier:@"fromSearchToProfileSeg" sender:nil];
}

还有prepareForSegue:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"fromSearchToProfileSeg"]){
    ///searchVC.username = self.username;
    NavViewController *navigationController = segue.destinationViewController;
    ProfileViewController *pro = (ProfileViewController * )navigationController.topViewController;
    pro.username = self.username;

    }

}

它看起来像:

enter image description here 不幸的是,当单击单元格时,segue正在工作,目标视图控制器已打开,但标签栏消失。有谁知道错误在哪里?

1 个答案:

答案 0 :(得分:2)

确保您没有选择"在推送时隐藏底栏"在该视图控制器的属性检查器中。

enter image description here

相关问题