1

I am quite new to iOS app development so I could not find solution or keyword to search for my problem.

I have been working on an workout tracking app which has tableview of workout exercise lists. and users can select each tableview cell as "finished" workout or "unfinished" workout. Im trying to make an image view where the image of body parts corresponds to the workout results. for example, if user finished chest workouts, the chest part of the body image gets colored to light green, and as user finishes more workouts, the coloring gets darker in green.

I have finished all other parts of the app but i don't know how to color specific part of an image.

Could anyone suggest me where to look? or the key word that I need to search for?

Donald Seo
  • 45
  • 1
  • 7

1 Answers1

1

The right way to achieve such thing is by having each body part separated in individual images, and displaying them together so that they form a body.

In order to tint your images, you can either use a UIImage category or built-in UIImage tint mode (available from iOS 7).

Community
  • 1
  • 1
David Roman
  • 2,548
  • 2
  • 16
  • 16
  • thank you for the answer David! I have tried using imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate with green color and it works perfectly. However, what I want to achieve is color an image multiple times when i press a button and the resulting image to become darker green each time when i color it ( for example, color of image accumulates and becomes darker). Do you have any suggestion on that? – Donald Seo Sep 25 '15 at 01:30
  • Well, I can think of a variable storing the level of greeness for your image, and making it a bit more darker every time such button is tapped. Those are implementations details really. There's a lot of ways you could get that work done :) – David Roman Sep 28 '15 at 04:44