Reputation: 1901
i am using a view controller which contain common custom buttons. and i am using this class where i need those buttons . Like create a logout button in this class name logOutViewController and use this class where i need to show the logout button.
#import "logOutViewController.h"
@interface TableViewController : logOutViewController
This above code shows the logout button on the required viewcontroller.
This code works well in all view controller except UITaleViewController. because after importing logOutViewController.h if i replace the
#import "logOutViewController.h"
@interface TableViewController : UITableViewController
UITableViewController to logOutViewController then the default function in the UITableViewController class start giving error.
How should i suppose to get the functions of uiviewcontroller class uitableviewcontroller class.
Upvotes: 0
Views: 1050
Reputation: 1760
You can work with UIViewController
, if you say that it works fine with it, just use TableView delegate methods.
For examle
@interface TableViewController : logOutViewController <UITableViewDelegate, UITableViewDataSource>
And use all needed methods.
Don't forget to create your UITableView
@property (nonatomic, weak) IBOutlet UITableView *tableView
And connect it with manually added tableView in IB.
Hope it will help
Upvotes: 1