forked from organicmaps/organicmaps
Merge pull request #367 from VladiMihaylenko/vm-master
[ios] Fixed bookmark description editing.
This commit is contained in:
commit
6635d42c18
1 changed files with 15 additions and 7 deletions
|
@ -45,12 +45,13 @@ typedef NS_ENUM(NSUInteger, BookmarkDescriptionState)
|
|||
[super viewDidLoad];
|
||||
self.navigationItem.title = L(@"description");
|
||||
MWMPlacePageEntity const * entity = self.manager.entity;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillChangeFrame:)
|
||||
name:UIKeyboardWillChangeFrameNotification
|
||||
object:nil];
|
||||
|
||||
if (!IPAD)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillChangeFrame:)
|
||||
name:UIKeyboardWillChangeFrameNotification
|
||||
object:nil];
|
||||
}
|
||||
if (entity.isHTMLDescription)
|
||||
self.state = BookmarkDescriptionStateViewHTML;
|
||||
else
|
||||
|
@ -60,7 +61,6 @@ typedef NS_ENUM(NSUInteger, BookmarkDescriptionState)
|
|||
{
|
||||
UIBarButtonItem * leftButton = [[UIBarButtonItem alloc] initWithCustomView:self.backButton];
|
||||
[self.navigationItem setLeftBarButtonItem:leftButton];
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,14 @@ typedef NS_ENUM(NSUInteger, BookmarkDescriptionState)
|
|||
[self.manager reloadBookmark];
|
||||
}
|
||||
|
||||
- (void)viewDidLayoutSubviews
|
||||
{
|
||||
[super viewDidLayoutSubviews];
|
||||
if (!IPAD)
|
||||
return;
|
||||
self.view.height = self.iPadOwnerNavigationController.view.height - self.iPadOwnerNavigationController.navigationBar.height;
|
||||
}
|
||||
|
||||
- (void)setState:(BookmarkDescriptionState)state
|
||||
{
|
||||
MWMPlacePageEntity * entity = self.manager.entity;
|
||||
|
|
Loading…
Add table
Reference in a new issue