【问题标题】:Double navigation bar objective c双导航栏目标c
【发布时间】:2017-04-18 23:59:09
【问题描述】:

双导航栏图片

伙计们,我正在从一个不支持 segue 的视图中推送,以编程方式使用代码:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
OtherUsersProfileViewController * vc=[storyboard instantiateViewControllerWithIdentifier:@"OtherUsersProfileViewController"];
vc.agent_ID = self.opponentID;
vc.agent_Name = self.title;
[self.navigationController pushViewController:vc animated:YES];

在 OtherUsersProfile 中我得到了一个双导航栏,它是什么?

【问题讨论】:

  • 您是否创建了自定义导航栏视图是故事板?
  • 是的,我愿意.......
  • 看看我的回答可能会有所帮助

标签: ios objective-c


【解决方案1】:

Image 开始,您无需在情节提要中添加新导航。

您必须选择实现这一目标:

第一种方式:使用默认导航栏

  1. 只需删除默认的后退按钮并添加新的自定义导航按钮。

    Hide Back Button

    Add Custom Image in Nav Bar

第二种方式:删除默认导航栏并通过故事板添加您的自定义导航栏。

 self.navigationController.navigationBar.hidden = YES;
 //And then your code will work fine.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多