- (void)viewDidLoad{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.[super viewDidAppear:YES];// Make self the delegate and datasource of the table view.
self.tblPeople.delegate = self;
self.tblPeople.dataSource = self;
// Initialize the dbManager property.
self.dbManager = [[DBManager alloc] initWithDatabaseFilename:@"sampledb.sql"];
// Load the data.
[self loadData];
}
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{ EditInfoViewController *editInfoViewController = [segue destinationViewController];
editInfoViewController.delegate = self;
editInfoViewController.recordIDToEdit = self.recordIDToEdit;
}
这三个语法有错误:
self.tblPeople.delegate = self; // Assigning to 'id<UITableViewDelegate> _Nullable' from incompatible type 'ViewBase *const __strong'
self.tblPeople.dataSource = self; // Assigning to 'id<UITableViewDataSource> _Nullable' from incompatible type 'ViewBase *const __strong'
editInfoViewController.delegate = self; // Assigning to 'id<EditInfoViewControllerDelegate>' from incompatible type 'ViewBase *const __strong'