I have two view controllers, GroupListViewController and GroupDetailViewController, switch back and forth, When you switch by clicking a row cell, Starting with an error, I don't have xib even. I make all the components programmatically. searching with the same question here is not my type.
in the code snippet below, "CustomGroupListViewCell * plcc" CustomGroupListViewCell is a custom UITableViewCell, you can implement a dump with an empty one,
enter the code here.
GroupListViewController.h
GroupListViewController.m
#import "GroupListViewController.h" #import "CustomGroupListViewCell.h" #import "ZYAppDelegate.h" #import "GroupDetailViewController.h" @interface GroupListViewController () @end @implementation GroupListViewController @synthesize dvController; - (void) viewDidLoad { contentArray = [[NSArray arrayWithObjects:@"heyun", @"wushi", @"ios", nil]retain]; [super viewDidLoad]; } - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) {
GroupDetailViewController.h
GroupDetailViewController.m
source share