Make pretty UIActivityIndicatorView

I once saw a library that can make a nice UIActivityIndicatorView easy, but I can't find it. Does anyone know or know another way to make a nice UIActivityIndicatorView ? something like that http://hpics.li/64d7b07

+4
source share
4 answers

Check out MBProgressHUD

I think that an activity indicator with a data label is what you are exactly looking for.

+10
source

I just did something similar today. I'm going to make it a suitable subclass, but for now this should get you started. Adding UILabel should be easy for you. I do this with ARC, so if you need to manage memory, 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]; 
+16
source

I have never heard of such a library, but it should not be too difficult to create your own (like an embedded UIView) and animate it.

Maybe even an animated gif? ( related question related here )

+1
source

I created a custom UIView ( Bootloader Animation ) to which you could boot into a subclass of UIActivity .

+1
source

Source: https://habr.com/ru/post/1382605/


All Articles