The first ViewController that the user sees is shown below. I would like to place each row (text field + switch)into a horizontal stack view and then all eight horizontal stack views into a vertical stack view. However, I am uncertain how this would be done while keeping the labels above each text field in place. I would appreciate any advice or tips as stack views are a new concept to me and I am unsure where else to turn.
Asked
Active
Viewed 47 times
1 Answers
2
I would suggest using UITableView. Of course using Stack view can work but it seems infeasible to add or remove a row.
Using UITableView, make your custom UITableViewCell, with the label, textfield and also the switch. To receive action from switch, can just simply using a protocol-delegate method declare in the custom UITableViewCell and implemented in your ViewController class

Edison Lo
- 476
- 8
- 25