UIActionsheet委托方法在ios8中调用两次?

Sun*_*hah 9 objective-c ipad ios ios8

在ios8中委托多次调用UIActionSheet的方法

  - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex
Run Code Online (Sandbox Code Playgroud)

我用IOS 8检查了ipad 2

Sun*_*hah 5

它是ios 8的一个bug ..

由于@rob表示UIActionSheet在iOS 8中已弃用.(UIActionSheetDelegate也已弃用.)

要在iOS 8及更高版本中创建和管理操作表,请使用 UIAlertController

  • 呃,iOS 8.0.x已经成为iOS发布以来的最快...... iOS iOS 4.0 (2认同)