From a7ee54465796f17dc31537833d6ae5c5fc039f61 Mon Sep 17 00:00:00 2001 From: Kirill Zhdanovich Date: Tue, 19 Mar 2013 01:15:52 +0300 Subject: [PATCH] [iOS]Show balloon of bookmark, if bookmark was chosen from category controller --- iphone/Maps/Bookmarks/BookmarksVC.mm | 2 ++ iphone/Maps/Classes/MapViewController.h | 1 + iphone/Maps/Classes/MapViewController.mm | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/iphone/Maps/Bookmarks/BookmarksVC.mm b/iphone/Maps/Bookmarks/BookmarksVC.mm index d66303a981..0a2fe3376f 100644 --- a/iphone/Maps/Bookmarks/BookmarksVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksVC.mm @@ -5,6 +5,7 @@ #import "SelectSetVC.h" #import "CompassView.h" #import "BookmarkCell.h" +#import "MapViewController.h" #include "Framework.h" @@ -222,6 +223,7 @@ { // Same as "Close". f.ShowBookmark(*bm); + [[MapsAppDelegate theApp].m_mapViewController showBallonWithCategoryIndex:m_categoryIndex andBookmarkIndex:indexPath.row]; [self dismissModalViewControllerAnimated:YES]; [self.navigationController.visibleViewController dismissModalViewControllerAnimated:YES]; } diff --git a/iphone/Maps/Classes/MapViewController.h b/iphone/Maps/Classes/MapViewController.h index 0009b11180..e521c90772 100644 --- a/iphone/Maps/Classes/MapViewController.h +++ b/iphone/Maps/Classes/MapViewController.h @@ -39,6 +39,7 @@ - (IBAction)OnBookmarksClicked:(id)sender; - (void)showSearchResultAsBookmarkAtMercatorPoint:(m2::PointD const &)pt withInfo:(Framework::AddressInfo const &)info; +- (void)showBallonWithCategoryIndex:(int)index andBookmarkIndex:(int)bmIndex; @property (nonatomic, retain) IBOutlet UIButton * m_myPositionButton; diff --git a/iphone/Maps/Classes/MapViewController.mm b/iphone/Maps/Classes/MapViewController.mm index 79565737af..bd33d0ac4c 100644 --- a/iphone/Maps/Classes/MapViewController.mm +++ b/iphone/Maps/Classes/MapViewController.mm @@ -690,4 +690,9 @@ NSInteger compareAddress(id l, id r, void * context) } } +- (void)showBallonWithCategoryIndex:(int)index andBookmarkIndex:(int)bmIndex +{ + [self onBookmarkClickWithBookmarkAndCategory:BookmarkAndCategory(index, bmIndex)]; +} + @end