Skip to content

Commit 1f5e2cd

Browse files
author
mklepp
committed
Add a timeout for the pull down to refresh spinner
1 parent d0e0c78 commit 1f5e2cd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

OwnCloud Notes/MasterViewController.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ @implementation MasterViewController
2626
- (void)fetchData
2727
{
2828
[[NSNotificationCenter defaultCenter] postNotificationName:kNotesShouldUpdateNotification object:self];
29+
30+
int64_t delayInSeconds = 5.0;
31+
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
32+
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
33+
[self.refreshControl endRefreshing];
34+
});
2935
}
3036

3137
- (void)awakeFromNib

0 commit comments

Comments
 (0)