mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
iOS: done #1139 (scroll to top)
Folder headers were misplaced due to adding the refresh control as a subview instead of setting the table property; jumping to the top was due to hiding search field, now only does that if at the top, and does it animated.
This commit is contained in:
parent
fe65f038a6
commit
30a1c89b41
2 changed files with 7 additions and 4 deletions
|
@ -115,7 +115,7 @@ static NSArray<NSString *> *NewsBlurTopSectionNames;
|
|||
self.refreshControl.tintColor = UIColorFromLightDarkRGB(0x0, 0xffffff);
|
||||
self.refreshControl.backgroundColor = UIColorFromRGB(0xE3E6E0);
|
||||
[self.refreshControl addTarget:self action:@selector(refresh:) forControlEvents:UIControlEventValueChanged];
|
||||
[self.feedTitlesTable addSubview:self.refreshControl];
|
||||
self.feedTitlesTable.refreshControl = self.refreshControl;
|
||||
self.feedViewToolbar.translatesAutoresizingMaskIntoConstraints = NO;
|
||||
|
||||
self.searchBar = [[UISearchBar alloc]
|
||||
|
@ -2100,8 +2100,11 @@ heightForHeaderInSection:(NSInteger)section {
|
|||
[self.appDelegate startOfflineQueue];
|
||||
}
|
||||
[self loadFavicons];
|
||||
if (!self.searchFeedIds) {
|
||||
[self.feedTitlesTable setContentOffset:CGPointMake(0, CGRectGetHeight(self.searchBar.frame))];
|
||||
if (!self.searchFeedIds && self.feedTitlesTable.contentOffset.y == 0) {
|
||||
[UIView animateWithDuration:0.2 animations:^{
|
||||
self.feedTitlesTable.contentOffset = CGPointMake(0, CGRectGetHeight(self.searchBar.frame));
|
||||
}];
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -2695,7 +2695,7 @@
|
|||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1000;
|
||||
LastUpgradeCheck = 1010;
|
||||
ORGANIZATIONNAME = NewsBlur;
|
||||
TargetAttributes = {
|
||||
1749390F1C251BFE003D98AA = {
|
||||
|
|
Loading…
Add table
Reference in a new issue