@objcMembers open class ViewFactory: NSObject
Handles the creation of recyclable views.
Initializes the view factory, and registers the default
public override init()
If a recycled view is available for re-use, that view is returned. If not, a new view of the given type is instantiated.
NoteViews obtained through this method should be recycled through
open func view<T>(forType type: T.Type) -> T where T: UIView
An object of the given
If the view conforms to the protocol
recycle()on the view and stores it for re-use later. Otherwise, nothing happens.
open func recycleView(_ view: UIView)
UIViewin a view hierarchy rooted by a given
UIView, recycles those that conform to the protocol
Recyclableand stores them for re-use later.
open func recycleViewTree(_ rootView: UIView)