If you build lots of forms — screens powered by table views that either read-only information or allow users to enter data such as names, dates/birthdays — Eureka is worth taking a look.
The README is very good, so I'll just show an example from there:
import Eureka
class MyFormViewController: FormViewController {
override func viewDidLoad() {
super.viewDidLoad()
form +++ Section("Section1")
<<< TextRow(){ row in
row.title = "Text Row"
row.placeholder = "Enter text here"
}
<<< PhoneRow(){
$0.title = "Phone Row"
$0.placeholder = "And numbers here"
}
+++ Section("Section2")
<<< DateRow(){
$0.title = "Date Row"
$0.value = Date(timeIntervalSinceReferenceDate: 0)
}
}
}
I've found Eureka very handy if your app mostly uses the original look and feel of iOS. If you need to customize the forms UI — while Eureka supports that too, by letting you specify your own custom row and cell classes — I've found it might be a bit more messy than I hoped.
Eureka can be installed via Cocoapods or Carthage.
Your feedback is valuable: Do you want more nuggets like this? Yes or No
.
.