chenliangloveyou / EasyNavigation

一款超级简单的导航条管理工具。完全自定义导航条。没有UINavigationBar 和 UINavigationItem 这两个类。完全是对UIView的操作。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在增加左边区域视图的时候,返回按钮的位置会错乱

hjzc opened this issue · comments

commented

在新的viewcontroller的viewdidload 增加左边区域按钮时候出现
只能自己改下 先fixed。
EasyNavigationView.h ---605行 改成
@synchronized(self.leftViewArray)
{
[self.leftViewArray addObject:view];
__block NSInteger tidx =-1;
[self.leftViewArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
//@" "
if ([obj isKindOfClass:[UIButton class]]) {
UIButton * btn = (UIButton *)obj;
if ([btn.titleLabel.text isEqualToString:@" "]) {
//is back button
tidx= idx;
*stop =YES;
}
}
}];
if(tidx>0)
{
[self.leftViewArray exchangeObjectAtIndex:0 withObjectAtIndex:tidx];
}
}

您好,谢谢反馈,已更改