[MAPSME-3043] [ios] Changed «update all» button display logic.

This commit is contained in:
Ilya Grechuhin 2016-11-23 10:31:46 +03:00
parent 5f2b80bb9a
commit 5017754c54

View file

@ -341,7 +341,10 @@ using namespace mwm;
{
if (!self.showAllMapsButtons)
return;
BOOL const hide = (scrollOffset >= self.lastScrollOffset) && !equalScreenDimensions(scrollOffset, 0.0);
UITableView * tv = self.tableView;
CGFloat const bottomOffset = tv.contentSize.height - tv.frame.size.height;
BOOL const hide =
scrollOffset >= self.lastScrollOffset && scrollOffset > 0 && scrollOffset < bottomOffset;
self.lastScrollOffset = scrollOffset;
if (self.allMapsView.hidden == hide)
return;
@ -455,9 +458,12 @@ using namespace mwm;
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
if ([self.dataSource isButtonCell:section])
return 36.0;
return 28.0;
return [self.dataSource isButtonCell:section] ? 36 : 28;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
return section == [tableView numberOfSections] - 1 ? 68 : 0;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section