Skip to content

Commit

Permalink
Added custom form size section
Browse files Browse the repository at this point in the history
Showing forms in a subview of the view controller.
Original content was here: xmartlabs#723
  • Loading branch information
olcayertas authored Aug 6, 2018
1 parent 640a8d6 commit 76f32d5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Made with ❤️ by [XMARTLABS](http://xmartlabs.com). This is the re-creation o
+ [Multivalued sections]
+ [Validations]
+ [Swipe Actions]
* [Custom form size]
* [Custom rows]
+ [Basic custom rows]
+ [Custom inline rows]
Expand Down Expand Up @@ -632,6 +633,14 @@ let row = TextRow() {
Swipe Actions need `tableView.isEditing` be set to `false`. Eureka will set this to `true` if there is a MultivaluedSection in the form (in the `viewWillAppear`).
If you have both MultivaluedSections and swipe actions in the same form you should set `isEditing` according to your needs.

## Custom form size

Forms will span the entire view controller when you extend FormViewController. If you want to show your form in a subview of your view controller follow below steps:

1. Add your UITableView to the view in your storyboard. Make sure the table view is styled as grouped rather than plain.
2. Drag from the tableView circle in the Outlets panel in the Connections Inspector. This outlet is provided by Eureka's FormViewController so there is no need to override it or create a new @IBOutlet for the table view.
3. Continue with your code as normal. The form variable now references your UITableView.

## Custom rows

It is very common that you need a row that is different from those included in Eureka. If this is the case you will have to create your own row but this should not be difficult. You can read [this tutorial on how to create custom rows](https://blog.xmartlabs.com/2016/09/06/Eureka-custom-row-tutorial/) to get started. You might also want to have a look at [EurekaCommunity] which includes some extra rows ready to be added to Eureka.
Expand Down

0 comments on commit 76f32d5

Please sign in to comment.