gpt4 book ai didi

ios - 我可以更改键盘方向吗?

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:09:45 24 4
gpt4 key购买 nike

例如我用这段代码关闭自动旋转

- (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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com