I_U*_*ser 5 uiactionsheet ipad ios
我UIActionSheet在我的视图中呈现了一个,其中一个操作表的按钮显示了另一个操作表.当我在iPad上展示第二个操作表时,我在日志中收到此警告消息:
要求UIPopoverBackgroundVisualEffectView为其不透明度设置动画.这将导致效果出现断裂,直到不透明度返回到1.
这是我的代码:
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Option"] delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Sort", nil];
actionSheet.tag = 1;
[actionSheet showInView:self.view];
Run Code Online (Sandbox Code Playgroud)
在代表中:
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
[self showSortAction];
}
-(void)showSortAction {
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Sort By" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"A-Z", @"Z-A", @"Newer to older", @"Older to newer", nil];
actionSheet.tag = 2;
[actionSheet showInView:self.view];
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
741 次 |
| 最近记录: |