Answer the question
In order to leave comments, you need to log in
How to put a scrollable form and a list on the same page in iOS?
Greetings!
The essence of the question is this.
There is a form in some fields/buttons and there is a data list. They are placed on the same page. I would like to make it possible to scroll the form along with the list, i.e. so that the form goes up beyond the screen border and the list scrolls further.
The only normal solution that came to my mind now is to make a table that will have a form in the first cell, and data in the subsequent cells. But it seems to me the scheme is a little clumsy. Perhaps there is a more canonical solution?
Answer the question
In order to leave comments, you need to log in
Well, look, it all depends on how you want it to work. If you are interested in a banal scroll, then tableView has a tableViewHeader property. You shove a View with a form into it, and you get a simple scroll. But this solution will be a little clumsy for the user - he will be able to scroll so that the form floor will be visible, but then the list will go on the screen.
If you need to do exactly page switching, i.e. either a form or a list, then do
UIScrollView:[UIView,UITableView]
where UIView is your form, the size of the entire screen of the device, and UITableView is a list, the same size.
They are placed vertically, on top of each other. in uiscrollView enable pagingEnabled and set the correct contentSize
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question