diff options
author | Ilya Grechuhin <i.grechuhin@mapswithme.com> | 2015-06-24 14:02:29 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:52:52 +0300 |
commit | 965f1f038181a6f5bae6e441cff4357f0e4dde09 (patch) | |
tree | 63a41e87bff0f3599f77415cc4c3db66182327a2 /iphone/Maps/Classes/MWMPlacePageViewManager.mm | |
parent | d0c5e0a09e7cee39eef306f7c52c1c1668ec8d42 (diff) |
[ios] Fixed layout bugs.
Diffstat (limited to 'iphone/Maps/Classes/MWMPlacePageViewManager.mm')
-rw-r--r-- | iphone/Maps/Classes/MWMPlacePageViewManager.mm | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/iphone/Maps/Classes/MWMPlacePageViewManager.mm b/iphone/Maps/Classes/MWMPlacePageViewManager.mm index 89caca631d..bca0128f79 100644 --- a/iphone/Maps/Classes/MWMPlacePageViewManager.mm +++ b/iphone/Maps/Classes/MWMPlacePageViewManager.mm @@ -16,7 +16,7 @@ #import "MWMPlacePage.h" #import "MWMPlacePageActionBar.h" #import "MWMPlacePageEntity.h" -#import "MWMPlacePageViewDragDelegate.h" +#import "MWMPlacePageViewManagerDelegate.h" #import "MWMPlacePageViewManager.h" #import "ShareActionSheet.h" #import "UIKitCategories.h" @@ -36,7 +36,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) unique_ptr<UserMarkCopy> m_userMark; } -@property (weak, nonatomic) UIViewController<MWMPlacePageViewDragDelegate> * ownerViewController; +@property (weak, nonatomic) UIViewController<MWMPlacePageViewManagerDelegate> * ownerViewController; @property (nonatomic, readwrite) MWMPlacePageEntity * entity; @property (nonatomic) MWMPlacePage * placePage; @property (nonatomic) MWMPlacePageManagerState state; @@ -47,7 +47,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) @implementation MWMPlacePageViewManager -- (instancetype)initWithViewController:(UIViewController<MWMPlacePageViewDragDelegate> *)viewController +- (instancetype)initWithViewController:(UIViewController<MWMPlacePageViewManagerDelegate> *)viewController { self = [super init]; if (self) @@ -100,6 +100,7 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) BOOL hasSpeed; self.entity.category = [[MapsAppDelegate theApp].m_locationManager formattedSpeedAndAltitude:hasSpeed]; } + self.placePage.topBound = self.topBound; [self.placePage configure]; [self refreshPlacePage]; } @@ -148,6 +149,13 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) } } +- (void)addSubviews:(NSArray *)views withNavigationController:(UINavigationController *)controller +{ + if (controller) + [self.ownerViewController addChildViewController:controller]; + [self.ownerViewController addPlacePageViews:views]; +} + - (void)buildRoute { GetFramework().BuildRoute(m_userMark->GetUserMark()->GetOrg()); @@ -265,4 +273,12 @@ typedef NS_ENUM(NSUInteger, MWMPlacePageManagerState) [self updateDistance]; } +#pragma mark - Properties + +- (void)setTopBound:(CGFloat)bound +{ + _topBound = bound; + self.placePage.topBound = bound; +} + @end |