I saw once a library that can do nice UIActivityIndicatorView
easily but I can not find it. Someone knows or knows another way to make nice UIActivityIndicatorView
? something like that
I just did something similar today. I'm going to make it a proper subclass, but for now, this should get you started. Adding a UILabel should be easy for you. I'm doing this with ARC so if you need to do memory management please be careful.
UIView *activityContainer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
activityContainer.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:.25];
UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake((self.view.frame.size.width/2) - 40, (self.view.frame.size.height/2) - 40, 80, 80)];
indicator.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
indicator.backgroundColor = [UIColor blackColor];
[indicator layer].cornerRadius = 8.0;
[indicator layer].masksToBounds = YES;
[activityContainer addSubview:indicator];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With