Quote:
Originally Posted by basanthalluri
Hai,
I want to switch from firstview to second view using navigation controller in view based template.
I already got windows and navigation templates.
Can any one suggest me with good example?
Thanks
Basanth
|
first create one button in first view and write the following code in button action
-(IBAction)buttonPressed
{
if(objSecondViewController == nil)
{
objSecondViewController = [[SecondViewControlle alloc] initWithNibName:@"SecondViewControlle" bundle:nil];
}
if(addNavigationController == nil)
addNavigationController = [[UINavigationController alloc] initWithRootViewController

bjSecondViewController];
[self.navigationController presentModalViewController:addNavigationController animated:YES];
}