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
in way,you need append attribtue string
arrowicon.appendattributedstring(anotherstring)
Comments
Post a Comment