1
アクションシート付きピッカービューと日付ピッカーを使用していて、iphoneでうまく動作しています。 私はipad用の私のiPhoneアプリをアップグレードしました。私は、アクションシートがプロパティを自動サイズ設定が、それはiPadの中に表示されていないと私は回転するときiphone.HereはあなたのiPadにActionsheetを使用して心に留めておく必要がありますIpad/iphone..actionシート
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とiphoneで同じを使用できますか? –
iPadで使用したい場合は、popover Viewcontrollerと同じコードを使用する必要があります。 – Aditya
iPhoneでも動作するpopover viewcontrollerを使用する必要がありますか?ipadとiphoneの別のコードを書いてはいけません。 –