I had an app rejected recently because of my pull to refresh functionality. Apple said that I was mimicking their functionality and that I either had to remove it or change it. I asked them if they could elaborate on it but they never responded. I ended up taking it out and it got approved but I'd like to add it back. Does anyone here have any idea why they would have rejected the app for this? Here is my pull to refresh code:
This is in the viewDidLoad method.
Code:
-(void)refreshView:(UIRefreshControl *)refresh
{
refresh.attributedTitle = [[NSAttributedString alloc] initWithString:@"Refreshing data..."];
// custom refresh logic would be placed here...
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"MMM d, h:mm a"];
NSString *lastUpdated = [NSString stringWithFormat:@"Last updated on %@",[formatter stringFromDate:[NSDate date]]];
refresh.attributedTitle = [[NSAttributedString alloc] initWithString:lastUpdated];
[refresh endRefreshing];
}
This is in the viewDidLoad method.
Code:
UIRefreshControl *refresh = [[UIRefreshControl alloc] init];
refresh.attributedTitle = [[NSAttributedString alloc] initWithString:@"Pull to Refresh"];
[refresh addTarget:self action:@selector(refreshView:)forControlEvents:UIControlEventValueChanged];
self.refreshControl = refresh;