“Please wait” dialog in iOS8

后端 未结 8 1998
离开以前
离开以前 2020-12-13 08:14

I used to have a \"Please wait\" dialog in my app for long time. It was quite simple thing using UIActivityIndicatorView and adding it to

8条回答
  •  温柔的废话
    2020-12-13 08:32

    Try this I done some trick...

    Below code is working for me in iPod iOS8beta5 + XCode6

    UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil
                                            message:@"Please wait\n\n\n"
                                     preferredStyle:UIAlertControllerStyleAlert];
    
        UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
        spinner.center = CGPointMake(130.5, 65.5);
        spinner.color = [UIColor blackColor];
        [spinner startAnimating];
        [alert.view addSubview:spinner];
        [self presentViewController:alert animated:NO completion:nil];
    

    enter image description here

提交回复
热议问题