导航栏标题变为绿色

时间:2014-07-25 09:10:47

标签: ios objective-c menu uinavigationcontroller uinavigationbar

我有一个菜单,设置为REfrostedViewController,每次我从菜单中切换不同的视图控制器时,导航栏的标题变为绿色。

Here is an album of the issue happening.

我使用push segues和Interface Builder从菜单中推送不同的视图控制器。

我尝试删除所有自定义(颜色,字体等),但它仍然会发生,而不仅仅是在模拟器上。

这是我从菜单中推送视图的方式:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
NavigationViewController *navigationController = [self.storyboard instantiateViewControllerWithIdentifier:@"contentController"];

if (indexPath.section == 0 && indexPath.row == 0)
{
    HomeViewController *home = [self.storyboard instantiateViewControllerWithIdentifier:@"Home"];
    navigationController.viewControllers = @[home];
}
else if (indexPath.section == 0 && indexPath.row == 1)
{
    ProfileViewController *profile = [self.storyboard instantiateViewControllerWithIdentifier:@"Profile"];
    navigationController.viewControllers = @[profile];
}
else if (indexPath.section == 0 && indexPath.row == 2)
{
    SortFriendsViewController *sortFriends = [self.storyboard instantiateViewControllerWithIdentifier:@"SortFriends"];
    navigationController.viewControllers = @[sortFriends];
}
else if (indexPath.section == 0 && indexPath.row == 3)
{
    InviteViewController *invite = [self.storyboard instantiateViewControllerWithIdentifier:@"Invite"];
    navigationController.viewControllers = @[invite];
}

加载另一个视图控制器时是否需要清空导航堆栈?我有什么可以做的吗?

如果您需要更多信息,请询问。

感谢。

0 个答案:

没有答案
相关问题