]]I am trying to build a UIActivityIndicator for my iOS app so that it is displaying the current state of certain processes that are running, and each quarter segment of the wheel will be highlighted by a different colour, depending on the status.
All of the tutorials I have seen show how to build an activity indicator that spins while something is loading, whereas I need the indicator to remain on the screen and show state. I need the indicator to remain hollow, with only the circumference that is coloured. How would I do this?
Core graphics. You’ll have to make a custom class that inherits from
UIViewand do all the drawing yourself. You’ll probably override a setter for a float(progress), which will update the display (using[self setNeedsDisplay]. Then in the drawRect: method you’ll use this class property ofprogressto determine what color and what angle to draw/fill in the view. Check out the source of MBProgressHud for some reference: MBProgressHUD