Jho*_*rra 2 uipickerview uiactionsheet ios ios5
这是我的实现,我基本上是动态创建动作表和选择器视图.问题是指示器显示您选择的项目未显示.
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:title delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
UIPickerView* picker = [[UIPickerView alloc] initWithFrame:CGRectMake(0,100, 320, 216)];
picker.dataSource = self;
picker.delegate = self;
[actionSheet addSubview:picker];
[actionSheet showInView:self.view];
[actionSheet setBounds:CGRectMake(0,0, 320, 411)];
Run Code Online (Sandbox Code Playgroud)
Pat*_*son 10
看起来你错过了这一行:
[picker setShowsSelectionIndicator:YES];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2142 次 |
| 最近记录: |