leah / PullToRefresh

A simple iPhone TableViewController for adding pull-to-refresh functionality.
http://blog.leahculver.com/2010/07/iphone-pull-to-refresh.html
MIT License
1.91k stars 252 forks source link

Hard-Coded sizes #15

Open avrahamshukron opened 12 years ago

avrahamshukron commented 12 years ago

in addPullToRefreshHeader method, all the sizes are hard-coded which is really bad.

For example, refreshHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0 - REFRESH_HEADER_HEIGHT, 320, REFRESH_HEADER_HEIGHT)];

Should be: CGSize tableViewSize = self.tableView.frame.size; refreshHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0 - REFRESH_HEADER_HEIGHT, tableViewSize.width, REFRESH_HEADER_HEIGHT)];