例如,我使用此代码关闭自动旋转
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return NO;
}
-(BOOL)shouldAutorotate
{
return NO;
}
-(NSUInteger)supportedInterfaceOrientations
{
return 0;
}
我的按钮、标签、文本字段和其他对象可以根据设备的当前方向旋转。但键盘不想旋转=/ 我如何旋转键盘或者不能旋转键盘。谁知道? 请帮忙) http://www.pictureshack.ru/images/8145_Snimok_ekrana_05_11_2013_18_55_00_s_Simulyatora_iOS.png
最佳答案
键盘方向与状态栏方向相同。
在图像中,所有按钮和文本方向都不在状态栏的方向。
尝试以下代码
-(BOOL)shouldAutorotate
{
return NO;
}
-(NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskPortrait;
}
- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
{
return UIInterfaceOrientationPortrait;
}
关于ios - 我可以更改键盘方向吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19810036/