How can I show alertview with activity indicator?

后端 未结 7 2219
青春惊慌失措
青春惊慌失措 2020-11-30 09:52

I want to show alertview with message: \"Loading data\" and spinning activity indicator. How can I do this?

相关标签:
7条回答
  • 2020-11-30 10:39
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alarm" message:@"" delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
    
    UIActivityIndicatorView *loading = [[UIActivityIndicatorView alloc]
                                        initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];   
    loading.frame=CGRectMake(125, 50, 36, 36);
    [loading startAnimating];
    [alert addSubview:loading];
    [alert show];
    
    0 讨论(0)
提交回复
热议问题