TagControl - admiral-team/admiralui-ios GitHub Wiki
Class
An ellipse view contains icon and text
Declaration
open class TagControl<T: UIView, V: UIView>: UIControl, AnyAppThemable, AccessibilitySupport
Overview
The Chips and Tags component groups allow users to quickly enter information, make selections, filter content, or trigger actions. A group of such components should be displayed sequentially, and the content of each component should be short with a clear call to action, which can be supported by an additional graphic element (icon) or emoji.
Leading and trailing view also can be any UIView. For example, you can make the left View like text, the right View like icon or vice versa. TagControl can be either active (clickable) or inactive.
In the library, the component is presented in five types:
- Primary
- Additional
- Success
- Attention
- Error
The width of the component depends on the content.
Live example
TagControl
Configure a Configure TagControl width leading icon and trailing text
let imageView = UIImageView()
imageView.image = Asset.TagsChips.carSolid.image
let tagView = TagControl()
tagView.setTitle("Tag")
tagView.leadingView = imageView
tagView.style = .additional
Contribution
You can help us to find bugs or ask us to add features.
- To start
issue
please use ready-made templates. - To make changes to the repository, you need to create a
fork
of the project, make changes to the code and create apull request
in our project. You can read more about this in the Github documentation.