FlaneurFormView
public final class FlaneurFormView: UIView
View in charge of displaying form elements.
It is quite poorly designed as many problems arose late in the implementation:
IGListKit-backed collection view is a terrible idea, it should be
a simple table viewSince
Since we design a form, we should skip reusable cells and just keep stong references of every cell: we wouldn’t need a cache anymoreobjc.io’s Swit Talks addressed the problems of reusable form components design in a series. It is a good inspiration to redesign this component.
Also, FlaneurImagePicker is actually a form component library. It would probably make
sense that other form components belong to the same library, that should then be renamed
FlaneurForm or something similar.
-
Undocumented
Declaration
Swift
public let collectionView: UICollectionView =
-
Initializes and returns a newly allocated navigation bar object with the specified frame rectangle.
Declaration
Swift
public override init(frame: CGRect)Parameters
frameThe frame rectangle for the view, measured in points.
-
Returns an object initialized from data in a given unarchiver.
Declaration
Swift
public required init?(coder: NSCoder)Parameters
coderAn unarchiver object.
-
Calls this exactly once.
Declaration
Swift
public func configure(viewController: UIViewController)Parameters
viewControllerthe view controller presenting the form.
-
Adds a form element.
See also
FlaneurFormElement
Declaration
Swift
public func addFormElement(_ formElement: FlaneurFormElement, cacheValue: String? = nil)Parameters
formElementthe form element to add to the form.
cacheValuethe cache value in case the form element is textual (this is terrible design).
-
Undocumented
Declaration
Swift
public func objects(for listAdapter: ListAdapter) -> [ListDiffable] -
Undocumented
Declaration
Swift
public func listAdapter(_ listAdapter: ListAdapter, sectionControllerFor object: Any) -> ListSectionController -
Undocumented
Declaration
Swift
public func emptyView(for listAdapter: ListAdapter) -> UIView?
-
Undocumented
Declaration
Swift
public func listAdapter(_ listAdapter: ListAdapter, willDisplay sectionController: ListSectionController) -
Undocumented
Declaration
Swift
public func listAdapter(_ listAdapter: ListAdapter, didEndDisplaying sectionController: ListSectionController) -
Undocumented
Declaration
Swift
public func listAdapter(_ listAdapter: ListAdapter, willDisplay sectionController: ListSectionController, cell: UICollectionViewCell, at index: Int) -
Undocumented
Declaration
Swift
public func listAdapter(_ listAdapter: ListAdapter, didEndDisplaying sectionController: ListSectionController, cell: UICollectionViewCell, at index: Int) -
Undocumented
Declaration
Swift
public func scrollCurrentFieldToVisible()
-
Undocumented
Declaration
Swift
public func nextElementShouldBecomeFirstResponder(cell: FlaneurFormElementCollectionViewCell) -
Undocumented
Declaration
Swift
public func scrollToVisibleSection(cell: FlaneurFormElementCollectionViewCell) -
Undocumented
Declaration
Swift
public func presentViewController(viewController: UIViewController) -
Undocumented
Declaration
Swift
public func cacheValue(forLabel label: String) -> String?
View on GitHub
FlaneurFormView Class Reference