0

I am using the example shown in the Pulltorefresh library. They have implemented it to fit a TableViewController class. But mine is a UIViewController, and i am adding a TableView in it.

I found a SO answer that shows a workaround for this. Can someone tell me how to implement it as described in the SO answer. Here's the link for the answer

Community
  • 1
  • 1
Illep
  • 16,375
  • 46
  • 171
  • 302

2 Answers2

0

That answer is not talking about using the library you are referencing. They are talking about how you would go about creating a UIScrollView with the "pull to refresh" functionality.

It shouldn't be that hard to transition the code to a UIViewController. Just change the code to subclass UIViewController and setup a UITableView property on the view controller (and make sure to set the data source & delegate of the UITableView to the view controller). There might be more to it but these are the basics. If you ask a more specific question about how to transition it to a UIViewController then maybe I (or someone else) can help more.

Michael Frederick
  • 16,664
  • 3
  • 43
  • 58
  • Well, i am unable to add the data source & delegate of the PullToRefresh class to my viewController. – Illep Jan 26 '12 at 18:09
0

maybe you could try a different library?

I've used this one in the past, and it worked great!

http://cocoacontrols.com/platforms/ios/controls/egotableviewpullrefresh

Edit:

Here is the exact tutorial I used. He does exactly what you want. Adds the pull to refresh to a UITableView that is contained in a UIViewController!

Lance
  • 8,872
  • 2
  • 36
  • 47
  • I need to add this feature to my UITableView which is in a UIViewController. I couldn't find a single example that does so. HELP – Illep Jan 27 '12 at 01:30