我在UIView上摆放一个UIView,上面的UiView完全覆盖下面的UIView,而且两个UIView都存在相应的UIViewController,然后问题来了。 1,首次进界面后,页面位置不准,嵌套的UIView总是偏上一点,并没有对齐。屏幕旋转过以后位置就准确了。 2,嵌套的UIView事件都不生效,如何才能让嵌套的UIView对应的UIViewController的事件(如shouldAutorate)生效? 现在我只能在顶层的UIView上调用底层的。希望高手能告诉我解决方法和原因。 万分感谢!! 高手如果能提供讲解的链接也万分感谢。
解决方案 »
- 请问如何实现UITableViewCell异步下载图片并根据图片大小自动调整Cell的高度
- 在未越狱IPhone上读写文件的问题
- freetype 问题
- Xcode下文本文件转换为Plist的问题(无法读入字符串和程序崩溃)
- iOS开发中,iPhone6 适配方法、iPhone6自动适配技巧
- UIScrollView 定位问题
- ios UITableViewCell如何点击一个cell出现个图片
- OC初始化的问题
- 使用autolayout的view能不能像cell一样,高度根据内容自适应啊?
- 监听NSMutableArray可变数组变化需求 思路征集
- 教育门户网站外包Android平台以及Iphone平台手机软件
- 在UIViewController上面点击按钮切换xib的问题
是viewwillappear失效吗
http://blog.csdn.net/ArthurChenJS/archive/2011/04/24/6358614.aspx
if ((interfaceOrientation == UIDeviceOrientationPortrait)
||(interfaceOrientation == UIDeviceOrientationPortraitUpsideDown)) {
self.view.bounds= CGRectMake(0.0f, 0.0f, 768.0f, 1024.0f);
self.view.frame= CGRectMake(0.0f, 0.0f, 768.0f, 1024.0f);
currentView.frame= CGRectMake(0.0f, 0.0f, 768.0f, 1024.0f);
}
if ((interfaceOrientation == UIDeviceOrientationLandscapeRight)
||(interfaceOrientation == UIDeviceOrientationLandscapeLeft)) {
self.view.bounds= CGRectMake(0.0f, 0.0f, 1024.0f, 768.0f);
self.view.frame= CGRectMake(0.0f, 0.0f, 1024.0f, 768.0f);
currentView.frame= CGRectMake(0.0f, 0.0f, 1024.0f, 768.0f);
}
return [currentViewController setViewControllersFrame:interfaceOrientation];
电池条也被我隐藏了。