Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Grechuhin <i.grechuhin@mapswithme.com>2015-06-25 15:01:33 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:53:01 +0300
commit1f38344c87c73edd8c49ee78a24fe894afa0c863 (patch)
treecc3ee9079b3ef8485b7c440396a44e793002d195 /iphone/Maps/Classes/MWMPlacePageViewManager.mm
parent19cf4cdc46937d22f2f61f4b2a3ae1f483a3d23f (diff)
[ios] Fixed status bar update.
Diffstat (limited to 'iphone/Maps/Classes/MWMPlacePageViewManager.mm')
-rw-r--r--iphone/Maps/Classes/MWMPlacePageViewManager.mm30
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;