您的位置:首页 > 其它

iphone 自动响应旋转屏幕

2011-08-24 10:28 387 查看
1。自动旋转:
在view.m文件中添加自动响应旋转的系统函数:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
//纵向
if (UIInterfaceOrientationPortrait == toInterfaceOrientation){
return
YES;
}
else
if (UIInterfaceOrientationPortraitUpsideDown == toInterfaceOrientation){
return
YES;
}
return
NO;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  iphone