UIAlertController 控件

2016-07-20  本文已影响12人  nalis风

UIAlertController* alertController=[UIAlertController alertControllerWithTitle:@"您的选择" message:[NSString stringWithFormat:@"%@",sender] preferredStyle:UIAlertControllerStyleAlert];

UIAlertAction* defaultAction=[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {

}];//一个UIAlertAction 是UIAlertController的一个按钮

[alertController addAction:defaultAction];

[self presentViewController:alertController animated:YES completion:nil];

上一篇下一篇

猜你喜欢

热点阅读