Hi Im trying to change the text color of a UILabel in the case when the labels rect intersects an UIView, i was thinking maybe there is a property or something i can use. Like in the image below:
Did someone meet this issue before, or what should i read to start doing this thing ?
Thanks in advance
Good puzzle! Here's what I would do:
originon their common
backgroundColorand it's label has light
textColorand the progress view has things the other way around.
The trick is, with the views' origins the same and the labels' origins the same, and clipsToBounds on the top view, everything is going to look right.
Drop those two views into a new UIView subclass called ReallyCoolProgressView, and give it one public method:
-(void)setProgress:(float)progress progress is a number from 0.0 to 1.0. The method scales the progressBar width and sets both label's text
@"Progress %f", progress*100