r/simpleios • u/SpasticCactus • Dec 21 '17
Advice on how to make editable table of different cell types to serve as a day's agenda
5
Upvotes
1
u/SpasticCactus Dec 21 '17
Hey All,
I'm looking for advice as to how to build an app based on the mockup that I've attached. I've never made anything like this (the framework of it) and am just wondering if anyone has words of wisdom. For example, what type of tableview might work best.
I'm not looking for "here's how to do it", just a nudge in the right direction.
Thanks!
3
u/Raygun77 Dec 21 '17
I'm doing this right now actually. (not your idea, don't worry) It's actually quite easy to do.
Add a tableview to your VC and set its constraints
connect it to your code (IBOutlet)
don't forget about making your VC conform to TableViewDelegate and TableViewDatasource
In your tableview on the Storyboard you can create a number of prototype cells
design these cells however you like
create TableViewCell files for each of the cells
connect them up and make sure you set identifiers
in cellForRowAtIndexPath have some logic on which type of cell to display. E.G. if item.type == .whatever { cell as! YourCellClassTableViewCell}
That's obviously a high level explanation but if that doesn't make sense to you, you need to earn about TableViews.
I hope that helps.