In EGOTableViewPullRefresh Demo I see he refer to property self.view and self.tableView in
EGORefreshTableHeaderView *view = [[EGORefreshTa开发者_如何学GobleHeaderView alloc] initWithFrame:CGRectMake(0.0f, 0.0f - self.tableView.bounds.size.height, self.view.frame.size.width, self.tableView.bounds.size.height)];
From my understanding view and tableView is the same object, but tableView is a type cast of view, but when I want to see implementation file I can't find it. I can see .h file with Option+click, but I can't find its implementation. How can I find .m file ?
You cannot see the TableViewController.m file because that implementation is private and Apple doesn't want you to be able to depend on an implementation--only the interface--for two reasons:
- If you depend on a specific implementation, they'll never be able to change/improve it because they'll need to continue to provide backward compatibility for some time to come.
- Apple doesn't want competitors (e.g., Android, etc.) to be able to easily copy their work.
You need to stick to the public documentation that Apple provides for the UITableView and friends. In there, I think you'll see that the view is an inherited property from the UIView class, whereas tableView is a property that connects the UITableViewController with the proper view for the table it is controlling.
精彩评论