Get Updates By E-mail 

Article Written By:
Johann Dowa

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.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments