Add a view before m...
Clear all

Add a view before master detail  


Ganesh A
Noble Member
Joined: 4 months ago
Posts: 1170
31/03/2021 12:10 pm  

I have made an app using the Master-Detail Application template, and I have realised that I need to have a view before the table view. How do I do this, because I have tried to create a view then setting the Main Interface to the new view, and I just get SigBRT...

How can I do this?

Sathish Kumar
Member Moderator
Joined: 4 months ago
Posts: 1203
07/04/2021 10:24 am  

Please create a project that use UIViewController (or drag it by yourself from object library). Then follow this steps:

1) Drag tableView into storyboard, place it in view controller that belongs to your UIViewController;

2) Add protocols in header of your class. Put it in interface line like this - @interface YourViewController : UIViewController

3) Add property to header of your class - @property (strong, nonatomic) IBOutlet UITableView *tableView;

4) Control+drag tableView on storyboard and connect it to DataSource and tableView delegate,and connect it to property IBOutlet UITableView *tableView;

5) Add cells, reuse identifiers to tableView, and class methods to implementation of your class.