我的应用使用uitabbar
和uinavigationbar
。但我在iOS7.1中遇到了问题。如果我在navigationbar
和没有navigationbar
的页面之间切换页面。页面有scrollview
或uitableview
,每次swith,self.view.frame或self.view.bounds都是正确的,但scrollview
或uitableview
的框架是正确的但是每次开关都会改变20px.one,一次降低。
我尝试在scrollview
视图中更改uitableview's
或bounds.y
viewWillAppear
。
CGRect
bounds
= contentScrollView
。bounds;
bounds.origin = CGPointMake(0,0);
contentScrollView.bounds = bounds;
但是,如果我这样做,好的,每次swith页面显示正确,但是当我拖动scrollview
或uitableview时,布局不正确。
该演示已在github上传:https://github.com/KingCentLee/HSText 我希望有人可以帮助我。以后iOS 7中的演示是正常的。只是iOS 7的swith页面遇到问题。并且能说出原因。谢谢。
答案 0 :(得分:0)
我见过你的代码。尝试删除viewWillAppear
中的代码。对不起,我没有ios7设备。在我的记忆中,它可能由系统状态栏导致高度仅为20px。这只是一个建议。 ps:我无法添加评论。