objective-c - ios导航栏切换bug,在线等,急

 我病态见不得你跟别人恩爱 发布于 2022-10-25 07:23

导航栏切换时出现bug。重现方式:在app里点来点去,可能会出现。
当出现该bug时,从首页进入任何带导航栏的页面都会出现此问题。

//项目中使用了下面这个category
#import "UINavigationController+FDFullscreenPopGesture.h"

//自定义首页导航栏的代码
//left item
UIButton *leftItem = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 14)];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:leftItem];

//title view
UIImageView *titleImage = [[UIImageView alloc] initWithImage:IMAGE(@"乡味汇横版")];
self.navigationItem.titleView = titleImage;

//right item
UIImageView *rightItem = [[UIImageView alloc] initWithImage:IMAGE(@"消息")];
[rightItem addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showMessage)] ];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightItem];

//UINavigationController+FDFullscreenPopGesture源码链接

1 个回答
  • 你好 请问你的问题解决了吗?我也遇到了类似的问题。请示你是不是隐藏导航栏然后自定义了?我是因为这样操作而导致的。我还不知道怎么优化呢?请问你是怎么处理得呢?

    2022-10-26 14:28 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有