I define a property for a class in its implementation file.
@property (nonatomic, strong) IBOutlet UIView *headerView;
Then I override its getter function by -(UIView*)headerView(){...}
to obtain some resources from main bundle.
In following code I need to set the property 'headerView' as subview to other views after it loads resource. Here are code fails to load resource.
[self.tableView setTableHeaderView:_headerView];
Getter function is not invoked. I change property variable to self.headerView:
[self.tableView setTableHeaderView:self.headerView];
It works now...
is there any difference between self.xxx and _xxx ? I think them identical to a property as different facets.