gpt4 book ai didi

ios - 如何调整操作表的大小? objective-c

转载 作者:行者123 更新时间:2023-12-01 20:18:01 29 4
gpt4 key购买 nike

friend 们,我使用了一个带有以下代码的简单操作表:-

popup = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:
@"Set Calander",
@"New Host",
@"Approvel",
@"Book Session",
@"Alter Session",
@"Update Post",
@"Center View",
@"Log Out",
nil];
[popup showInView:self.view];

当我在任何 iphone 模拟器中运行它时效果很好,但是当我尝试在 iPad 中运行它时,我的操作表显示不正确。我使用了 Storyboard。 enter image description here

最佳答案

如果设备是 ipad 而不是 showinview使用其他方法,例如 tabbarbarbuttonitemrectinview
引用示例代码

-(void)actionPhotoShare:(id)sender
{
actionSheetShare = [[UIActionSheet alloc] initWithTitle:nil
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:NSLocalizedString(@"ActionSheet_Cancel", @"")
otherButtonTitles:NSLocalizedString(@"ActionSheet_Email", @""),nil];

if (IS_DEVICE_IPAD) {
[actionSheetShare showFromBarButtonItem:sender animated:YES];
}else {
[actionSheetShare showInView:self.view];
}
}

关于ios - 如何调整操作表的大小? objective-c ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36276051/

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