gpt4 book ai didi

iphone - Ipad/iphone..操作表

转载 作者:行者123 更新时间:2023-11-28 17:47:21 25 4
gpt4 key购买 nike

我在操作表中使用了选择器 View 和日期选择器,它在 iPhone 中运行良好。我为 ipad 升级了我的 iphone 应用程序。我设置了 action sheets autoresize 属性,但它没有显示在 ipad 中,当我旋转 iphone 时。这是我的代码

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select Payment Type"
delegate:self
cancelButtonTitle:@"Done"
destructiveButtonTitle:@"Cancel"
otherButtonTitles:nil];


// Add the picker
picker = [[UIPickerView alloc] initWithFrame:CGRectMake(0,185,0,0)];

picker.delegate = self;
picker.showsSelectionIndicator = YES; // note this is default to NO
picker.autoresizingMask=UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
[actionSheet addSubview:picker];
[actionSheet showInView:self.view];
[actionSheet setBounds:CGRectMake(0,0,320, 700)];
actionSheet.autoresizingMask=UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleTopMargin
|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleBottomMargin;
[picker release];
[actionSheet release];

最佳答案

在 iPad 中使用 Actionsheet 时应牢记的一点是它显示为 PopOver ViewController。这是 iPad 中 Action Sheet 的默认行为。

干杯

关于iphone - Ipad/iphone..操作表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4930478/

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