I have created a navigation-based application. In that, I have created MyTableViewController using uiviewcontroller.class.
#import "RootViewController.h"
#import "MyTableViewController.h"
@implementation RootViewController
- (void)viewDidLoad
{
[super viewDidLoad];
MyTableViewController *tableViewController = [[MyTableViewController alloc] init];
}
@end
#import "MyTableViewController.h"
@implementation MyTableViewController
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"sedfsdsd");
}
@end
I don’t want to show the view when the instance is created. I want to call the constructor method. I don’t know how to do it. Please help me out.
@Caroline have described very good.
A normal method of your class could serve your purpose and you can name that something
ViewContructionand define it in your MyTableViewController class.Call the above function explicitly on the instance of your view controller.