[ios] MWMBottomMenuControllerProtocol's adding methods were implemented.

This commit is contained in:
VladiMihaylenko 2016-03-03 15:37:13 +03:00 committed by Sergey Yershov
parent 006b05f767
commit 8e18151d5d

View file

@ -2,10 +2,12 @@
#import "EAGLView.h"
#import "MapsAppDelegate.h"
#import "MapViewController.h"
#import "MWMAddPlaceNavigationBar.h"
#import "MWMAlertViewController.h"
#import "MWMAPIBar.h"
#import "MWMBottomMenuViewController.h"
#import "MWMButton.h"
#import "MWMObjectsCategorySelectorController.h"
#import "MWMFrameworkListener.h"
#import "MWMFrameworkObservers.h"
#import "MWMMapViewControlsManager.h"
@ -23,6 +25,11 @@
#include "Framework.h"
namespace
{
NSString * const kMapToCategorySelectorSegue = @"MapToCategorySelectorSegue";
} // namespace
extern NSString * const kAlohalyticsTapEventKey;
@interface MWMMapViewControlsManager ()<
@ -255,6 +262,32 @@ extern NSString * const kAlohalyticsTapEventKey;
}
}
#pragma mark - MWMBottomMenuControllerProtocol
- (void)addPlace
{
self.menuState = MWMBottomMenuStateHidden;
static_cast<EAGLView *>(self.ownerController.view).widgetsManager.fullScreen = YES;
[self.placePageManager dismissPlacePage];
self.searchManager.state = MWMSearchManagerStateHidden;
[MWMAddPlaceNavigationBar showInSuperview:self.ownerController.view doneBlock:^
{
[self.ownerController performSegueWithIdentifier:kMapToCategorySelectorSegue sender:nil];
[self didFinishAddingPlace];
}
cancelBlock:^
{
[self didFinishAddingPlace];
}];
}
- (void)didFinishAddingPlace
{
self.menuState = MWMBottomMenuStateInactive;
static_cast<EAGLView *>(self.ownerController.view).widgetsManager.fullScreen = NO;
}
#pragma mark - MWMPlacePageViewManagerDelegate
- (void)dragPlacePage:(CGRect)frame