I want to display a number on image like badge of size 30*28, which is placed upon button image,
I have an badge image to set up on the top of button image.. on top of badge image I should able to display text or number and my badge size is 30*28.
so, for this to achieve I want to set a label on top of my button image and so I want to set label background to some image called badge image.
found this in stack overflow itself as the above code just gives the background without the label
was useful for me so sharing
theLabel.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"blah"]];
See: Adding Background image to UILabel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With