I have a UITableViewController (MyViewController.xib). This is showing 3 rows with their title. I have 3 new xib file for each row title.On each row selection I want to load XIB file. I am getting the place when I am clicking on RowIndex Selection. But when i am trying to load NIB file nothing is happening. I mean nither program is being crashed nor NIB file is being load.
I am defining my interface declaration here.
#import <UIKit/UIKit.h>
#import "HistoryShow.h"
@interface MyViewController : UITableViewController {
NSArray *tableList;
IBOutlet HistoryShow *historyController;
}
@property (nonatomic,retain) NSArray *tableList;
@property (nonatomic,retain) IBOutlet HistoryShow *historyController;
@end
My implementation details are below.
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *str = [NSString stringWithFormat:@"%@",[tableList objectAtIndex:indexPath.row]]; //typecasting
if([@"History" isEqual:str])
{
NSLog(@"!!!!!!!!!!!!!!!");
HistoryShow *detailViewController = [[[HistoryShow alloc]initWithNibName:@"HistoryShow" bundle:nil]autorelease];
[historyController release];
}
}
This is prining “!!!!!!” on console but next “HistoryShow.xib” is not being load.
What is the exact problem ?
Thanks in advance.
You are instantiating
detailViewController, but you aren’t doing anything with it.Try adding this after the
allocofdetailViewController: