diff options
author | Ilya Grechuhin <i.grechuhin@mapswithme.com> | 2015-06-25 15:01:33 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:53:01 +0300 |
commit | 1f38344c87c73edd8c49ee78a24fe894afa0c863 (patch) | |
tree | cc3ee9079b3ef8485b7c440396a44e793002d195 /iphone/Maps/Classes/MWMPlacePageViewManager.mm | |
parent | 19cf4cdc46937d22f2f61f4b2a3ae1f483a3d23f (diff) |
[ios] Fixed status bar update.
Diffstat (limited to 'iphone/Maps/Classes/MWMPlacePageViewManager.mm')
-rw-r--r-- | iphone/Maps/Classes/MWMPlacePageViewManager.mm | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/iphone/Maps/Classes/MWMPlacePageViewManager.mm b/iphone/Maps/Classes/MWMPlacePageViewManager.mm index 9e4e581c40..d9add67a53 100644 --- a/iphone/Maps/Classes/MWMPlacePageViewManager.mm +++ b/iphone/Maps/Classes/MWMPlacePageViewManager.mm @@ -278,14 +278,38 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) - (void)showDirectionViewWithTitle:(NSString *)title type:(NSString *)type { - self.directionView = [MWMDirectionView directionViewForViewController:self.ownerViewController]; - self.directionView.titleLabel.text = title; - self.directionView.typeLabel.text = type; + UIViewController<MWMPlacePageViewManagerDelegate> * ovc = self.ownerViewController; + MWMDirectionView * directionView = self.directionView; + directionView.titleLabel.text = title; + directionView.typeLabel.text = type; + [ovc.view addSubview:directionView]; + [directionView setNeedsLayout]; + [ovc updateStatusBarStyle]; + [(MapsAppDelegate *)[UIApplication sharedApplication].delegate disableStandby]; [self updateDistance]; } +- (void)hideDirectionView +{ + [self.directionView removeFromSuperview]; + [self.ownerViewController updateStatusBarStyle]; + [(MapsAppDelegate *)[UIApplication sharedApplication].delegate enableStandby]; +} + #pragma mark - Properties +- (MWMDirectionView *)directionView +{ + if (!_directionView) + _directionView = [[MWMDirectionView alloc] initWithManager:self]; + return _directionView; +} + +- (BOOL)isDirectionViewShown +{ + return self.directionView.superview; +} + - (void)setTopBound:(CGFloat)bound { _topBound = bound; |