UI issue with nil title in UIAlertView iOS 8 beta 5

前端 未结 4 1274
栀梦
栀梦 2021-02-13 10:41

I have an issue related to UIAlertView while running our app on iOS 8. I am showing an alert with title as nil. It was working fine in iOS 7 but now UI looks odd.

I ha

4条回答
  •  旧时难觅i
    2021-02-13 11:13

    Please try this code. it is working on my side xcode version 9.2

    UIAlertController * alert=   [UIAlertController
                                  alertControllerWithTitle:nil
                                  message:nil
                                  preferredStyle:UIAlertControllerStyleActionSheet];
    UIAlertAction* btn1 = [UIAlertAction
                           actionWithTitle:@"OKAY"
                           style:UIAlertActionStyleDefault
                           handler:^(UIAlertAction * action)
                           {
    
                           }];
    
    [self presentViewController:alert animated:YES completion:nil];
    

提交回复
热议问题