I have a UI View, which consists of image view and a label. UI view has constraints set up to the superview. These labels are of different sizes,(data coming from backend) so I want to adjust the background image according to the length of the label.
For example : Label : "Hi How are you" In this scenario - the image should fit the label and should look proportionate to the screen
Label : "Hi" In the scenario - the image should fit the label containing just "Hi", meaning it should shrink based on the label string length.
Is this possible ?
Follow these steps:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.