问题
I want to create a list of tags, what I'll take from an array, but how can I stylize it as:
inside of bubbles and auto place in the next row if the line is full. Any tips or ideas?
回答1:
Please read this library link giving below it has awesome and custom tag design all the things you required for your design.
https://github.com/ElaWorkshop/TagListView
Here is how to use it.
- add its cocoapods [pod "TagListView"].
- Create a view on which you wanna to show your selected tags and constraint it.
- change your view class name to "TagListView".
- set delegate on viewDidLoad(). [yourView.delegate = self]
- now you use it. eg.
yourView.addTag("Name on Tag") or yourView.addTags(["Name on Tag First","Name on Tag second","Name on tag third",.....and so on])
回答2:
I have implemented a simple and customizable tag list view in swift using a collection view.
Here is my github link.
来源:https://stackoverflow.com/questions/33625895/how-can-i-make-tag-list-in-swift