diff options
author | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-11-29 18:24:40 +0300 |
---|---|---|
committer | Ilya Grechuhin <i.grechuhin@gmail.com> | 2016-11-29 18:24:40 +0300 |
commit | 74978ec8692daceabf43437614b945a3f7d86011 (patch) | |
tree | 030fdc036cd54529371f353721e7502defe876db | |
parent | d17622244e88ced212ad6c2fd895a23d2e99da0a (diff) |
[cleanup] [ios] Fixed traffic button offset.
-rw-r--r-- | iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm | 4 | ||||
-rw-r--r-- | iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm index 23c31a1238..271b635111 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/Search/MWMSearchManager.mm @@ -493,7 +493,9 @@ typedef NS_ENUM(NSUInteger, MWMSearchManagerActionBarState) { [parentView addSubview:actionBarView]; [parentView addSubview:contentView]; [self layoutTopViews]; - [[MWMMapViewControlsManager manager] searchFrameUpdated:self.searchBarView.frame]; + CGRect searchAndStatusBarFrame = self.searchBarView.frame; + searchAndStatusBarFrame.size.height += statusBarHeight(); + [[MWMMapViewControlsManager manager] searchFrameUpdated:searchAndStatusBarFrame]; } [UIView animateWithDuration:kDefaultAnimationDuration animations:^{ diff --git a/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm b/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm index 30bf0dd260..a58b593570 100644 --- a/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm +++ b/iphone/Maps/Classes/CustomViews/MapViewControls/TrafficButton/MWMTrafficButtonViewController.mm @@ -14,7 +14,8 @@ typedef NS_ENUM(NSUInteger, MWMTrafficButtonState) { namespace { -CGFloat const kTopOffset = 16; +CGFloat const kTopOffset = 26; +CGFloat const kTopShiftedOffset = 6; } // namespace @interface MWMMapViewControlsManager () @@ -118,7 +119,7 @@ CGFloat const kTopOffset = 16; - (void)refreshLayout { runAsyncOnMainQueue(^{ - CGFloat const topOffset = self.topBound + kTopOffset; + CGFloat const topOffset = self.topBound > 0 ? self.topBound + kTopShiftedOffset : kTopOffset; CGFloat const leftOffset = self.hidden ? -self.view.width : self.leftBound + kViewControlsOffsetToBounds; UIView * ov = self.view.superview; |