My app use uitabbar
and uinavigationbar
.but I encounter a problem in iOS7.1. if I switch page between one with navigationbar
and one without navigationbar
. the page have scrollview
or uitableview
,every time swith,self.view.frame or self.view.bounds is Correct,but scrollview
or uitableview
's frame is Correct but bounds.y every time swith will change 20px.one up,one down. i try to change scrollview
or uitableview's
bounds.y
in view will viewWillAppear
. CGRect
bounds
= contentScrollView
.bounds; bounds.origin = CGPointMake(0, 0);
contentScrollView.bounds = bounds;
but if i do it,ok,every time swith page is show right,but when i drag the scrollview
or uitableview,the layout incorrect.
the demo has upload on github: https://github.com/KingCentLee/HSText I hope someone can help me.the demo in iOS 7 later is normal. just iOS 7 swith page encounter the problem.and can tell the reason.Thank you.
I have seen your code. Try delete the code in viewWillAppear
. I'am sorry, I don't have ios7 device. In my memory, it may cause by the system status bar which height is just 20px. This is only a suggestion. ps:I can't add a comment.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.