Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

滑动隐藏导航栏后下拉显示时返回箭头不见了 #55

Closed
ChinaFanny opened this issue Dec 21, 2016 · 2 comments
Closed

滑动隐藏导航栏后下拉显示时返回箭头不见了 #55

ChinaFanny opened this issue Dec 21, 2016 · 2 comments

Comments

@ChinaFanny
Copy link

当navigationcontroller执行 push操作后,返回按钮是系统的,滑动隐藏导航栏后下拉显示时返回箭头不见了,如下图,请问这个是怎么回事,如何修改呢?谢谢~~~
qq20161221-180913 2x
qq20161221-180935 2x
qq20161221-180946 2x

@ChinaFanny
Copy link
Author

ChinaFanny commented Dec 26, 2016

在lt_setElementsAlpha方法中,修改“obj.alpha = obj.alpha == 0 ? 0 : alpha”语句为“obj.alpha = alpha”, 可以解决我上述提到的问题,望作者采纳解决~
`- (void)lt_setElementsAlpha:(CGFloat)alpha {
[[self valueForKey:@"_leftViews"] enumerateObjectsUsingBlock:^(UIView *view, NSUInteger i, BOOL *stop) {
view.alpha = alpha;
}];

[[self valueForKey:@"_rightViews"] enumerateObjectsUsingBlock:^(UIView *view, NSUInteger i, BOOL *stop) {
    view.alpha = alpha;
}];

UIView *titleView = [self valueForKey:@"_titleView"];
titleView.alpha = alpha;
// when viewController first load, the titleView maybe nil
[[self subviews] enumerateObjectsUsingBlock:^(UIView *obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:NSClassFromString(@"UINavigationItemView")]) {
obj.alpha = alpha;
}
if ([obj isKindOfClass:NSClassFromString(@"_UINavigationBarBackIndicatorView")]) {
//
// Modified by ChinaFanny
// (解决push一个controller后,滑动隐藏导航后再滑动显示时返回按钮<系统自带返回按钮>的箭头消失问题)
//

// obj.alpha = obj.alpha == 0 ? 0 : alpha;
obj.alpha = alpha;
}
}];
}`

@ltebean
Copy link
Owner

ltebean commented Dec 26, 2016

fixed in v2.1.9

@ltebean ltebean closed this as completed Dec 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants