viewDidLoad 메서드에서 debbuger를 사용하여 검사했으며 tracerTableView는 0x0이라고 가정합니다.이 값이 nil이라는 것을 의미합니다. 나는 이해하지 못한다. 나는 가서 아하드로 가야한다. 네, 이미 펜촉 파일을 확인했는데 네 모든 연결이 맞습니다. 다음은 헤더 파일과 .m의 구걸입니다.내 UITableView가 설정되어 있지 않은 이유는 무엇입니까?
.H 파일
@interface TrackerListController : UITableViewController <AddPackageDelegate>{
// The mutable (modifiable) dictionary days holds all the data for the days tab
NSMutableArray *trackerList;
UITableView *tracerTableView;
}
@property (nonatomic, retain) NSMutableArray *trackerList;
@property (nonatomic, retain) IBOutlet UITableView. *tracerTableView;
//The addPackage: method is invoked when the user taps the addbutton created at runtime.
-(void) addPackage : (id) sender;
@end
하는 .m 파일
@implementation TrackerListController
@synthesize trackerList, tracerTableView;
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"Package Tracker";
self.navigationItem.leftBarButtonItem = self.editButtonItem;
UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(addPackage:)];
// Set up the Add custom button on the right of the navigation bar
self.navigationItem.rightBarButtonItem = addButton;
[addButton release];
// Release the addButton from memory since it is no longer needed
}