sarunw
sarunw

Reputation: 8176

Where can I find .m file of UIKit

In EGOTableViewPullRefresh Demo I see he refer to property self.view and self.tableView in

EGORefreshTableHeaderView *view = [[EGORefreshTableHeaderView 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 ?

Upvotes: 1

Views: 296

Answers (1)

Jonathan Geisler
Jonathan Geisler

Reputation: 472

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:

  1. 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.
  2. 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.

Upvotes: 2

Related Questions