ios - How to set image only for a certain part of title in UIButton -
I have a UIButton whose title is as a guru see 20. An image that has a background pattern for the button , This image is resized in width and the material mode aspect is fit. So it appears on the full button. My problem: I just need an image for "20" part, not the whole "Guru 20" if you see the iPad calendar you will get the point. How can I do this? Thank you
Unless there is a feature string that does not have the functionality of applying a rectangle around it, Create a custom view that handles it:
You should have a scene that leaves two strings, one common and one in the rectangle. Then enter a normal label, set text, make the call size tofitt. Then add another label and do the same as before, but in the end it is located next to the first label then add image view to the label regarding label views. Then resize the entire scene to fit all the ideas on it. Now you can add this custom label to a button or anywhere ...
Comments
Post a Comment