Add a view before m...
Notifications
Clear all

Add a view before master detail

RSS

(@anamika)
Noble Member
加入:2年ago
Posts: 1381
31/03/2021 12:12 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?


Quote
(@sathish)
Member Moderator
加入:2年ago
Posts: 1391
31/03/2021 12:13 pm

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.


ReplyQuote
Share:
Baidu