I'm trying to push different detail views using the Search bar. I'm using a .plist data source. The searchbar works ok by finding the title of the text , but it always pushes the same detail view (the first row). I know that is because I have my tableview calling those detailviews using specific rows and sections. for example
The Searchbar therefor always pushes the AppleTartController. I'm trying to find a logic to use inside the searchbar and push it's own nib file by it's name or any other way...
I'm almost sure that calling the section or row won't work using Searchbar, it needs to call something more specific.. The Arrays (on the .plist) only have 1 string for the title of the recipes (searchbar finds that ok) and I'm calling their nib files by it's row or section.
Thanks for your help
Code:
if (indexPath.section == 0 & indexPath.row == 0){
AppleTartController *apple = [[AppleTartController alloc] initWithNibName:@"AppleTartView" bundle: nil];
[self.navigationController pushViewController:apple animated:YES];
[apple release];
}
else if (indexPath.section == 1 & indexPath.row == 0){
BiscottiController *biscotti = [[BiscottiController alloc] initWithNibName:@"BiscottiView" bundle: nil];
[self.navigationController pushViewController:biscotti animated:YES ];
[biscotti release];
The Searchbar therefor always pushes the AppleTartController. I'm trying to find a logic to use inside the searchbar and push it's own nib file by it's name or any other way...
I'm almost sure that calling the section or row won't work using Searchbar, it needs to call something more specific.. The Arrays (on the .plist) only have 1 string for the title of the recipes (searchbar finds that ok) and I'm calling their nib files by it's row or section.
Thanks for your help