I’d like to display a UIActivityView in a rounded transparent box with text, just like the one shown below. Does anyone know how to do this?
p.s. I’d rather not be putting it in an UIAlertView, but I don’t know how to do it any other way.
Thanks!
Tristan

Sure, create a new UIView subclass, call it whatever you like. Add a couple of ivars, one for your activity indicator, and one for your message (so a
UIActivityIndicatorViewand aUILabel). Connect those up to properties if you wish, probably a good idea for the label anyway.You’ll also want to define some methods, things like
-showand-hideto show the view and hide it. You can get fancy animating it however you want, if you want, I’m not going to go into that here.Next thing you’ll want to do (or at least how I’ve done it) is to create the view, by specing out its frame, let’s just define it like this:
This will make it 160×160. Adjust its
backgroundColorto 50% opacity, make sure itsopaqueproperty is also set to NO. You’ll also want something like:where
selfpoints at the view you’re creating naturally.That should be enough information to get you started, most people animate it (I typically make it really big, i.e., 160×2 by 160×2, and rapidly shrink it down to the size I want, to give it a popping effect, fade it out on completion, stuff like that). I’ll leave that as an exercise for you though.