As seen in the attached image, I am trying to use FontAwesomeKit to display icons aligned with text on a button. For simplicity, I'd love to be able to do this with an attributed string rather than an image and string.
But I can't seem to figure out how to get the icons to vertically center-align with the text. I've tried a few different things, but they all seem to affect either nothing or the entire icon + text.
As seen in the attached image, I am trying to use FontAwesomeKit to display icons aligned with text on a button. For simplicity, I'd love to be able to do this with an attributed string rather than an image and string.
But I can't seem to figure out how to get the icons to vertically center-align with the text. I've tried a few different things, but they all seem to affect either nothing or the entire icon + text.
My code follows…
I suspect I am missing some
NSAttributedString
feature; any helpful pointers would be appreciated.