already i am declared navigation object like this
UINavigationController *naviButtonpro;
@property (nonatomic, retain) IBOutlet UINavigationController *naviButtonpro;
and also declared @synthesize naviButtonpro;
self.naviButtonpro = [[UINavigationController alloc] initWithNibName:@"NaviButtonViewController" bundle:nil];
[self.window addSubview:self.naviButtonpro.view];
when i am using this method
-(IBAction)displayNextPage:(id)sender
{
dispNext *gotoback = [[dispNext alloc] initWithNibName:@"dispNextView" bundle:[NSBundle mainBundle]];
//UINavigationController *naviButtonpro = [[UINavigationController alloc] initWithNibName:@"NaviButtonViewController" bundle:nil];
[self.naviButtonpro pushViewController:gotoback animated:YES];
[gotoback release];
}
i am geting an error like this
Request for member ‘naviButtonpro’ in something not a structure or union
can u tell me the how to resolve this problem
2 things to note here.
Firstly, you aren’t creating a UINavigationController. You need to alloc init it. You seem to have it in the code but its commented out.
Secondly, dispNext needs to subclass & inherit from UIViewController. Does it do this?