关闭。这个问题需要details or clarity .它目前不接受答案。
想改进这个问题?通过 editing this post 添加详细信息并澄清问题.
8年前关闭。
Improve this question
为什么 uiview 在更改设备方向而不完全滚动 uitableview 时会自动更改方向
(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations.
if (self.medcategoryPopOver!=nil) {
[self.medcategoryPopOver dismissPopoverAnimated:YES];
}
if (interfaceOrientation == UIInterfaceOrientationPortrait ||interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown) {
mediconDisplay.hidden=NO;
return YES;
} else if (interfaceOrientation==UIInterfaceOrientationLandscapeLeft) {
mediconDisplay.hidden=YES;
return TRUE;
} else {
mediconDisplay.hidden=YES;
return TRUE;
}
}
最佳答案
只需检查默认 View 的大小。如果默认情况下它大于滚动将不会启用...
关于iphone - 当我们改变设备方向时查看设置默认大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8574504/