I have a button that I'm creating in a UIViewController like so:
TOLoginButton* button = [[[TOLoginButton alloc] initWithFrame:CGRectMake(60,180,200,40)] autorelease];
[self.view addSubview:button];
The button is a UIControll and I'm trying to call another UIViewController from within the touchUpInside method, below is what I have but it doesn't work:
(void)touchUpInside {
MyViewController *viewController = [[MyViewController alloc] init]; [super.view addSubview:viewController.view ]; }
I'm basically trying to call this viewController once my button is pressed.
So viewController1 has the button on it and once the button is pressed I want to do something like [viewController1.view addSubview:viewController2.view].
Any help will be appreciated