The data browser is built for Chrome, Firefox, Safari, and IE9 and above. Please upgrade your browser, or download Google Chrome to get the best experience.
Back to Questions

UIRefreshControl in PFQueryTableViewController

7 votes     4 answers     2.38k views     

7

Any plans to support the new UIRefreshControl for iOS 6 users? It looks kind of cool.

For backwards compatibility you could continue using the current pull-to-refresh, or there are a few which look like they emulate UIRefreshControl (e.g. ODRefreshControl, SlimeRefresh).

You can actually disable the native parse one and use the IOS API like I did. I was forced to do this because because of the geoPoint API.

https://gist.github.com/4069722

- Martin Tran over 1 year ago

4 Answers

6

Makes sense. I'll see how soon we can add this to our framework.

4

I just stumbled onto this question, but it's straight-forward to use the iOS 6 refreshControl in a PFQueryTableViewController subclass

(1) create a method to use with target action that calls loadObjects (check PFQueryViewController header file)

- (IBAction)refresh:(id)sender {
    [self loadObjects];
}

(2) In IB, with your custom subclass scene selected, set Refreshing enabled in the attributes inspector

(3) In viewDidLoad add the target action to self.refreshControl (workaround for the well known refreshControl IB bug)

- (void)viewDidLoad {
    [super viewDidLoad];

    // IB workaround for target action with refreshControl
    [self.refreshControl addTarget:self
                            action:@selector(refresh:)
                  forControlEvents:UIControlEventValueChanged];
}

(4) Turn off the animation in objectsDidLoad

- (void)objectsDidLoad:(NSError *)error {
    [super objectsDidLoad:error];

    [self.refreshControl endRefreshing];
}

Hey @colinhb, I personally don't have time trying this out, but thanks!

P.S: I was in love when Parse developers used to release new SDK features day–by–day, but they seem too busy with third–party service integrations nowadays, no new features or improvements...

- Ali Servet Donmez about 1 year ago

This worked. Thanks!!

- Veeral Patel about 1 year ago
0

+1

0

@Matt, it still ain't there yet, but I came up with my own, you could give it a try if you like: https://github.com/exalted/ParseKit