
-(BOol)shouldautorotatetoInterfaceOrIEntation:(UIInterfaceOrIEntation)interfaceOrIEntation{ if(interfaceOrIEntation == UIInterfaceOrIEntationPortrait||interfaceOrIEntation == UIInterfaceOrIEntationPortraitUpsIDeDown) {self.vIEwProfile.frame = CGRectMake(238,612,295,73);// some more settings}else{self.profileNew.frame = CGRectMake(374,540,58); // some more settings} return YES;} 对于iOS 6,我做了以下代码,但那不起作用:
-(BOol)shouldautorotate{ return YES;}-(NSInteger)supportedInterfaceOrIEntations{ if (UIDeviceOrIEntationIsPortrait([UIDevice currentDevice].orIEntation)) { self.vIEwProfile.frame = CGRectMake(238,73); // some more settings } else { self.profileNew.frame = CGRectMake(374,58); // some more settings } return UIInterfaceOrIEntationMaskAll;} 如何像在iOS 5.x中一样检查iOS 6中的界面内容?
谢谢
解决方法 您可以使用vIEwWillLayoutSubvIEws方法,在该方法中检查方向[[UIApplication sharedApplication] statusbarOrIEntation];
并相应地设置您的帧.
希望这可以帮助!
总结以上是内存溢出为你收集整理的objective-c – 在iOS 6中获取当前界面方向全部内容,希望文章能够帮你解决objective-c – 在iOS 6中获取当前界面方向所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)