美文网首页IOSbugios开发
授人以鱼不如授人以渔,百度搜索技巧之牛刀小试--ios UIna

授人以鱼不如授人以渔,百度搜索技巧之牛刀小试--ios UIna

作者: 司马捷 | 来源:发表于2015-08-04 14:41 被阅读199次

有个问题,我也不知道怎么描述,我在百度搜索中打入ios UInavigationBar bug,各种五花八门,根本没有我想要的问题.
别着急.用我的方法:ios UINavigationBar bug site:stackoverflow.com
这个大家都懂了,stackoverflow 绝对值得拥有.
我的UInavigationBar bug 其实就是这个http://stackoverflow.com/questions/18948505/uinavigationbar-status-bar-issue-in-ios7 这个描述的

enter image description here
还有一张
enter image description here

两次都不一样,这个问题你遇到了么?

新建UINavigationViewController 子类.
重写这个代理方法
- (UIBarPosition)positionForBar:(id <UIBarPositioning>)bar{
return UIBarPositionTopAttached;
}

如果这样还解决不了,就有可能是操作速度太快,动画来不及反应,读取的frme 不正确,在显示NavigationController的时候延迟0.3秒,等待自动布局

double delayInSeconds = 0.3;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
    [self.dynamicsDrawerViewController setPaneViewController:nv animated:NO completion:nil];

});

相关文章

网友评论

    本文标题:授人以鱼不如授人以渔,百度搜索技巧之牛刀小试--ios UIna

    本文链接:https://www.haomeiwen.com/subject/lpvvqttx.html