0
我想在UIActionSheet的UIAickerView中創建UIPickerView,在選擇器上方的動作表上的一個條上的「完成」按鈕,我試圖從標籤欄顯示動作表。在UIActionSheet中的TabBarController的UIPIckerView
這裏是我使用創建我的選擇器代碼:
_beepPicker = [[UIPickerView alloc] initWithFrame:CGRectMake(0, 0, 320, 216)];
_beepPicker.showsSelectionIndicator = YES;
_beepPicker.dataSource = self;
_beepPicker.delegate = self;
這裏是我使用創建我的動作片(與我的「完成」按鈕)
_beepPickerActionSheet = [[UIActionSheet alloc]
initWithTitle:nil
delegate:nil
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
UISegmentedControl *doneButton = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObject:@"Done"]];
doneButton.momentary = YES;
doneButton.frame = CGRectMake(260, 7.0f, 50.0f, 30.0f);
doneButton.segmentedControlStyle = UISegmentedControlStyleBar;
doneButton.tintColor = [UIColor blackColor];
[doneButton addTarget:self action:@selector(dismissBeepPicker:) forControlEvents:UIControlEventValueChanged];
[_beepPickerActionSheet addSubview:doneButton];
代碼這裏是我如何添加我的「完成」按鈕:
[_beepPickerActionSheet addSubview:_beepPicker];
最後,這裏是我如何試圖顯示的行動s HEET:
[_beepPickerActionSheet showFromTabBar:self.tabBarController.tabBar];
行動表確實顯示...但是,我只能看到約30動作片的頂部的像素????????
任何想法我可能做錯了嗎?
當我檢查我的調試器...這裏是我看到的行動表上
UIActionSheet的框架:0x6b304f0; frame =(0 455; 320 25);
截圖前:
截圖後:
你可以發佈截圖嗎? – rosslebeau 2012-03-29 00:25:50
我發佈了......謝謝 – 2012-03-29 02:17:42