ortuman / SwiftForms

A small and lightweight library written in Swift that allows you to easily create forms.
MIT License
1.33k stars 209 forks source link

[booleanSwitch] default value #167

Closed rjong closed 6 years ago

rjong commented 7 years ago

Hi there,

How can I set the booleanSwitch 'on' by default? I proceed already: row1.value = true as AnyObject row1.value = "true" as AnyObject row1.value = "1" as AnyObject

Thanks!

rjong commented 6 years ago

Anyone?

erolando commented 6 years ago

row.value = (employee.isActive ?? false) as AnyObject

works for me