Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for optional NSAttributedString, for cell text. #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stucarney
Copy link

Hey, Tho. So, I wanted to use Apple's Symbols (as images) in my cells, so switched to using NSAttributedStrings with NSTextAttachments, for each UITableViewCell.

In this PR, I added support for an optional NSAttributedString to set the cell's attributedText instead. items are now an array of type BTItem, which is a struct I created with a String and an optional NSAttributedString. If a NSAttributedString is set for an item, it will use that instead.

I don't know if would be popular or not, since it is a breaking change with the previous array of Strings, for items, but otherwise it works the same. One would just pass in BTItem(string: "Text"), instead of "Text" for each element.

-Stu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant