A bug occurs when switching the navigation bar. How to reproduce: Click here and there in the app and it may appear.
When this bug occurs, this problem will occur when entering any page with a navigation bar from the home page.
//項目中使用了下面這個category
#import "UINavigationController+FDFullscreenPopGesture.h"
//自定義首頁導(dǎo)航欄的代碼
//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(@"鄉(xiāng)味匯橫版")];
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 source code link
光陰似箭催人老,日月如移越少年。
Hello, has your problem been solved? I also encountered a similar problem. Could you please tell me whether you hide the navigation bar and then customize it? This is what I did. I still don’t know how to optimize it? How did you handle it?