Hello all,
I want to add a gradient color to my UILabel or any text on my iPhone screen. I want to know the ways to do it. Both Using interface and programatically.
tnx
Hello all,
I want to add a gradient color to my UILabel or any text on my iPhone screen. I want to know the ways to do it. Both Using interface and programatically.
tnx
In in the interface, you should be able to select the label and go to inspector (apple + 1) and change the color from there.
Programmatically, use the following property.
UILabel textColor property reference
Example:
[mylabel setTextColor: [UIColor redColor]];
To gradient, all you have to do is extend this a little. Break the text that you want to gradient into a group of labels, group them with a list of some sort, and iterate over the grouped labels and apply a textColor. This sort of gradient is trivial and derives immediately from the documentation provided.