【发布时间】:2018-07-22 17:04:30
【问题描述】:
我正在尝试下一个方法:
Message *message = self.messagesArray[indexPath.row];
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:LocalizedString(@"FirstAction")
message:@""
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *editMessage = [UIAlertAction actionWithTitle:LocalizedString(@"SecondAction") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
[alertController addAction:editMessage];
UIAlertAction *forwardMessage = [UIAlertAction actionWithTitle:LocalizedString(@"ThirdAction") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
[alertController addAction:forwardMessage];
UIAlertAction *deleteMessage = [UIAlertAction actionWithTitle:LocalizedString(@"DeleteMessage") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
}];
[alertController addAction:deleteMessage];
[self setSourceViewForAlertController:alertController];
[self presentViewController:alertController animated:YES completion:nil];
[self createMenuForMessage:message];
[[UIMenuController sharedMenuController] setMenuVisible:YES animated:YES];
所以,我的目标是同时为 UICollectionViewCell 和 UIMenuController 提供 alertcontroller。
【问题讨论】:
-
显示您的要求
-
请详细说明....
-
你需要同时显示两个东西???你为什么要这样做?
-
@ReinierMelian 只是为用户提供更多选择。如果不可能,我会寻找其他 UX 决策。
-
@Viktorianec 你的问题到底是什么,我可以显示 actionSheet 和菜单,但可以触摸菜单,直到 actionSheet 被解除
标签: ios objective-c uialertcontroller uimenucontroller