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

assertion failed: self.form property MUST be assigned #103

Closed jsonmat closed 8 years ago

jsonmat commented 8 years ago

I am getting the error above when trying to call tableView.reloadData() from my function.

But if I put it inside the button's action, it works fine:

func submit(_: UIBarButtonItem!) {

        //let message = self.form.formValues().description

        //let alert: UIAlertView = UIAlertView(title: "Form output", message: message, delegate: nil, cancelButtonTitle: "OK")

        //alert.show()
        row4.configuration[FormRowDescriptor.Configuration.Options] = ["hello", "from", "the"]
        row4.value = "hello"
        self.tableView.reloadData()

    }
What should I do?
jsonmat commented 8 years ago

Last question please..

ortuman commented 8 years ago

Please, refer to README.MD to know how to configure a FormViewController properly. As you mentioned in your issue title FormViewController form property is not being assigned.