感謝您的幫助,但我嘗試下面的解決方案。
- (CGSize)splitViewSizeForOrientation:(UIInterfaceOrientation)theOrientation
{
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) {// Added to solve iOS 7.0 status bar issue
statusBarHeight = 0;
}
} // This one solves my right panel issue.
- (void)layoutSubviewsForInterfaceOrientation:(UIInterfaceOrientation)theOrientation withAnimation:(BOOL)animate
{
CGRect newFrame;
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
{
newFrame = CGRectMake(0, 20.0, width, height-20.0);
}
else
{
newFrame = CGRectMake(0, 0.0, width, height);
}
}// this one solves left panel issue.
*我也放在下面的代碼中所有View的viewDidLoad()方法。
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0"))
{
if ([self respondsToSelector:@selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone;
}
我的建議:請先備份! – Maulik
謝謝,我已經擁有了它......我想要一個建議來解決這個問題。 –
引用此:http://stackoverflow.com/questions/18375898/status-bar-appear-over-my-views-bounds-in-ios-7 – Maulik