I have 2 view controller
VC1 has button
in this button action
- (IBAction)clickSearch:(id)sender
{
NSArray *vc=[self.navigationController viewControllers];
ViewControllerSearch *vcSearch=nil;
for (int i=0; i<[vc count]; i++)
{
UIViewController *tempVC=[vc objectAtIndex:i];
if([tempVC isKindOfClass:[ViewControllerSearch class]])
{
vcSearch=[vc objectAtIndex:i];
break;
}
}
if(vcSearch)
{
[self.navigationController popToViewController:vcSearch animated:YES];
}
else
{
ViewControllerSearch *vc3New= [[ViewControllerSearch alloc]initWithNibName:@"ViewControllerSearch" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:vc3New animated:YES];
vc3New = nil;
}
}
ViewControllerSearch id my second view controller.these two view s connected with push segue.
when i click the button coming this error.
Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Could not load NIB in bundle: 'NSBundle </Users/Ravi/Library/Application Support/iPhone Simulator/6.0/Applications/42268111-F290-40B8-B893-4649852F762C/coffee break app.app> (loaded)' with name 'ViewControllerSearch''
how can i fixed this error?please give me idea.