diff --git a/iphone/Maps/Classes/MWMPlacePageButtonCell.mm b/iphone/Maps/Classes/MWMPlacePageButtonCell.mm index c74eeaf26e..7e2cf08950 100644 --- a/iphone/Maps/Classes/MWMPlacePageButtonCell.mm +++ b/iphone/Maps/Classes/MWMPlacePageButtonCell.mm @@ -18,6 +18,13 @@ @implementation MWMPlacePageButtonCell +- (void)awakeFromNib +{ + [super awakeFromNib]; + [self.titleButton setTitleColor:[UIColor linkBlueHighlighted] forState:UIControlStateDisabled]; + [self.titleButton setTitleColor:[UIColor linkBlue] forState:UIControlStateNormal]; +} + - (void)config:(MWMPlacePageViewManager *)manager forType:(MWMPlacePageCellType)type { self.countryId = GetFramework().GetCountryInfoGetter().GetRegionCountryId(manager.entity.mercator); @@ -49,7 +56,9 @@ title = L(@"details"); break; } + [self.titleButton setTitle:title forState:UIControlStateNormal]; + [self.titleButton setTitle:title forState:UIControlStateDisabled]; } - (IBAction)buttonTap @@ -106,25 +115,29 @@ - (void)setType:(MWMPlacePageCellType)type { _type = type; + NSString * title; switch (type) { case MWMPlacePageCellTypeAddBusinessButton: - [self.titleButton setTitle:L(@"placepage_add_business_button") forState:UIControlStateNormal]; + title = L(@"placepage_add_business_button"); [MWMFrameworkListener addObserver:self]; break; case MWMPlacePageCellTypeEditButton: - [self.titleButton setTitle:L(@"edit_place") forState:UIControlStateNormal]; + title = L(@"edit_place"); [MWMFrameworkListener addObserver:self]; break; case MWMPlacePageCellTypeAddPlaceButton: - [self.titleButton setTitle:L(@"placepage_add_place_button") forState:UIControlStateNormal]; + title = L(@"placepage_add_place_button"); [MWMFrameworkListener addObserver:self]; break; case MWMPlacePageCellTypeBookingMore: - [self.titleButton setTitle:L(@"details") forState:UIControlStateNormal]; + title = L(@"details"); break; default: NSAssert(false, @"Invalid place page cell type!"); break; } + + [self.titleButton setTitle:title forState:UIControlStateNormal]; + [self.titleButton setTitle:title forState:UIControlStateDisabled]; } @end diff --git a/iphone/Maps/Classes/MWMPlacePageLayout.mm b/iphone/Maps/Classes/MWMPlacePageLayout.mm index e212f4f3e5..606c96d08e 100644 --- a/iphone/Maps/Classes/MWMPlacePageLayout.mm +++ b/iphone/Maps/Classes/MWMPlacePageLayout.mm @@ -291,7 +291,7 @@ void animate(TMWMVoidBlock animate, TMWMVoidBlock completion = nil) { case NodeStatus::Undefined: { - self.isPlacePageButtonsEnabled = YES; + self.isPlacePageButtonsEnabled = NO; auto const it = find(sections.begin(), sections.end(), place_page::Sections::Buttons); if (it != sections.end()) {