I'm completely stumped on how to even proceed with solving this problem. I'm not very good with Obj-C, but I need to create a customized UIButton that will have text on the left side of the button and an image on the right side of the button. The problem is that the text can vary from being 10 characters long to 17 characters long. So, the button needs to resize based on the text length.
The button must have a black background with a corner radius of 12 with white foreground text.
I saw this post on SO: How do I create a custom view class Programmatically?.
This is sort of similar to what I need to do, but I don't understand how to get the "resizable text" part of it to work.
How can I create a custom view where the label and image in the button are configured using constraints?