ios - Embed an icon in between text in a text label with swift -


i able embed text label looks code below. how add string called locationto right side of arrow?

var place = self.places[indexpath.row] place     var attachment = nstextattachment()     attachment.image = uiimage(named: "right-50.png")     var attachmentstring = nsattributedstring(attachment: attachment)     var arrowicon = nsmutableattributedstring(string: place.location)     arrowicon.appendattributedstring(attachmentstring)     cell.textlabel!.attributedtext = arrowicon  

enter image description here

in way,you need append attribtue string

    arrowicon.appendattributedstring(anotherstring) 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -