ipad 设备中的状态栏垂直对齐
状态栏在模拟器中完美显示在顶部(水平),但在 ipad 设备中它在屏幕边缘垂直对齐(与显示在设备屏幕上边缘的最传统方法相反)。shouldAutoRotatetoInterfaceOrientation 方法未在任何控制器中实现。
可能是什么问题以及如何解决这个问题?
Status bar displays perfectly on top(horizontally)in simulator but it aligns vertically at the edge of screen (against the most conventional method of appearing at the upper edge of device screen)in the ipad device.shouldAutoRotatetoInterfaceOrientation method is not implemented in any controller.
What might be the problem and how can i fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我的例子中,应用程序分布广泛,因此模式是纵向的,尽管状态栏设置为横向。我对状态栏进行了纵向处理,并在 viewWillAppear 中添加 [[UIApplication shareApplication] setStatusBarOrientation:UIInterfaceOrientationPortraitAnimated:animated]
In my case the application is spreaded widely so the mode was portrait although status bar is set as landscape.I did portrait to status bar and In viewWillAppear add [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:animated]