An Extensive Open Source Swift Based Library For Creating Forms

I’ve mentioned a number of iOS objective-c form creation libraries most recently XLForm and BPForms.

Here’s a nice open source Swift library for creating forms called SwiftForms from Miguel Ángel Ortuño.

SwiftForms provides a nice simple syntax for creating forms, an extensive number of built-in form components, and you can completely customize the table view cells if desired.

This source code example from the readme shows the syntax for creating a basic form with SwiftForms:

// Create form instance
let form = FormDescriptor()
form.title = "Example form"

// Define first section
let section1 = FormSectionDescriptor()

var row: FormRowDescriptor! = FormRowDescriptor(tag: "name", rowType: .Email, title: "Email")
section1.addRow(row)

row = FormRowDescriptor(tag: "pass", rowType: .Password, title: "Password")
section1.addRow(row)

// Define second section
let section2 = FormSectionDescriptor()

row = FormRowDescriptor(tag: "button", rowType: .Button, title: "Submit")
section2.addRow(row)

form.sections = [section1, section2]

self.form = form

This animation from the readme shows SwiftForms running within an example application:

SwiftForms

SwiftForms

You can find SwiftForms on Github here.

A nice Swift based library for creating forms.

FacebookTwitterDiggStumbleUponGoogle Plus

Original article: An Extensive Open Source Swift Based Library For Creating Forms

©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.

Leave a Reply

Your email address will not be published. Required fields are marked *