Carl Henretti
Carl Henretti

Reputation: 477

Swift 3: Grid of table views

I'm sorry that I don't post any code in this questions; I'm relatively new to programming and I'm already failing on how to realize my idea.

What I want to create is an app, where

  1. the onboarding screen is an editable table view with custom table view cells
  2. when selecting one of the cells, another (!) editable table view is opened.

That means that every time when adding a row to the main table view, another table view is created in addition to the existing one, that I can access through tapping on my table view cell. Of course, the main table view and the created table view should both be saved and still be there when restarting the app.

I don't want code, I just want some specific advice from some more advanced programmers on how to make this.

Thank you!

Upvotes: 0

Views: 2355

Answers (1)

Aehmlo
Aehmlo

Reputation: 930

For a grid layout, you'll want to use UICollectionView, not UITableView. Here's the UICollectionView documentation.

As for showing another table view on tap: simply use a UIViewController subclass (or maybe a UITableViewController if you're sure you want to use a table view) to present another view. You'll probably want to use this in conjunction with a UINavigationController. I recommend reading the documentation for UINavigationController to understand this pattern better.

Apple's docs are pretty great; go use them! Familiarize yourself with the view controller scheme on iOS and a big chunk of the work in learning will take care of itself. Good luck!

Upvotes: 1

Related Questions