4

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 http://hpics.li/64d7b07

1
  • What do you mean 'nice' ? Can you please be specific. ?! Commented Nov 22, 2011 at 23:36

4 Answers 4

16

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];
Sign up to request clarification or add additional context in comments.

Comments

10

Check out MBProgressHUD

I think the activity indicator with the details label is what you're exactly looking for.

Comments

1

I've never heard of a library like this, but it shouldn't be too hard to create your own (as an embeddable UIView) and animate it.

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

Comments

1

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.