1。自动旋转:
在view.m文件中添加自动响应旋转的系统函数:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{
//纵向
if (UIInterfaceOrientationPortrait == toInterfaceOrientation){
return YES;
}
else if (UIInterfaceOrientationPortraitUpsideDown == toInterfaceOrientation){
return YES;
}
return NO;
}