I need an idea how to put image to uilabel text. The text should look like this:
“Hello press ‘image’, then press ‘image2’, after that you press ‘image3′” and so on. The text is dynamic, so adding everything to static locations is not an option..
I simply would like to have reference to image in my text. Something like (“Text %@, hello”, image)
Why to do that in label ?
you can do it easily by UIView and UILabel and UIButton , the
[NSString sizeWithFont:forWidth:lineBreakMode:] will help you where to add your views by calculating each text width, so you can add your views dynamically ,
you need to assign the image as background to the UIButton
you add the first label then calculate where the first to add the first button and so on