libc++abi.dylib: terminate_handler unexpectedly threw an exception
出现在UIActionSheet 弹出后,触摸屏幕,app崩溃。
原因:UIActionSheet在8.3之后过时,要使用 UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet
UIAlertController *alertSheet = [UIAlertController alertControllerWithTitle:<#yourTitle#> message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *action = [UIAlertAction actionWithTitle: <#yourActionTitle#>style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
<#dosometingWhenClick#>
}];
[alertSheet addAction:action];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
[alertSheet addAction:cancelAction];
[self presentViewController:alertSheet animated:YES completion:nil];