更新时间:2022-11-03 19:32:56
所以基本上你想要从中查看警报视图块。你可以这样做:
So basically you want to access the alert view from the block. You can do something like this:
__block __weak UIAlertView *alertViewWeak;
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Add"
message:@"Add New Asset Type"
completion:^(BOOL cancelled, NSInteger buttonIndex){
if (!cancelled) {
//call on completion of UISheetAction ???
NSLog(@"%@",[alertViewWeak textFieldAtIndex:0]);
}
}
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK", nil];
alertViewWeak = alertView;
[alertView show];