SwipeMenuViewController
SwipeMenuViewController copied to clipboard
Update TabView to accept NSAttributedString
Here I update the TabView to accept NSAttributedString in lieu of String.
This enables quite a bit more flexibility with what you add as the title to the tab bar. For instance, one can now add images using the NSTextAttachment.
Regarding implementation, I have the TabView prefer func tabView(_ tabView: TabView, titleForItemAt index: Int) -> String? over func tabView(_ tabView: TabView, attributedTitleForItemAt index: Int) -> NSAttributedString?, so if you implement both dataSource methods for a given index it will use the original.