I wanted to make a custom subclass of TagView to hold onto a data structure of mine so I wouldn't have to look up the data for each tag when I check what tags are in the tag view. TagListView has an open function addTagView(_:), but the createNewTagView(_:) function that actually applies tag styling is private, which makes it impossible to make custom tag views. As it stands, this code:
I had previously implemented this with the simple addTag(_:) method, which works just fine. The only change I made was to use addTagView(_:) with my own custom-made TagViews. For the record, the string input to this tag was "Thai", which probably shouldn't cause an overflow
I wanted to make a custom subclass of
TagView
to hold onto a data structure of mine so I wouldn't have to look up the data for each tag when I check what tags are in the tag view.TagListView
has anopen
functionaddTagView(_:)
, but thecreateNewTagView(_:)
function that actually applies tag styling isprivate
, which makes it impossible to make custom tag views. As it stands, this code:produces this result:
I had previously implemented this with the simple
addTag(_:)
method, which works just fine. The only change I made was to useaddTagView(_:)
with my own custom-madeTagView
s. For the record, the string input to this tag was "Thai", which probably shouldn't cause an overflow