TagListView
is a container view which aligns its children(tags) from left to right and from top to bottom. It has the following benefits:
UIView
.var alignment: Alignment { get set }
It controls how the children within a row should be placed in the main axis. Possible values are start
, center
and end
.
var crossAxisAlignment: Alignment { get set }
It controls how the children within a row should be aligned relative to each other in the cross axis. Possible values are start
, center
and end
.
var spacing: CGFloat { get set }
It controls how much space to place between children in a row in the main axis.
var rowSpacing: CGFloat { get set }
It controls how much space to place between the rows themselves in the cross axis.
func addTagView(_ view: UIView)
func removeTagView(_ view: UIView)
These two functions should be used to manage tags
rather than addSubview
and removeFromSuperview
.
For TagListView
to layout properly its width must be constrainted horizontally by
This repository is ready as a package for SPM.
Just drag Sources/TagListView/TagListView.swift
to your project and it's all done.
link |
Stars: 1 |
Last commit: 13 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics