diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2012-10-16 15:58:44 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:45:37 +0300 |
commit | 0af5b9ccfebd521f025fcb785f6168735e3f7e30 (patch) | |
tree | 01ab5cfb5c38a3077d9c44ebb14df8fb23e82a86 /iphone | |
parent | 529600f3403e8557c267827c9da831d5b0da873e (diff) |
[ios] Disable Done key on keyboard if textfield is empty
Diffstat (limited to 'iphone')
-rw-r--r-- | iphone/Maps/Bookmarks/BookmarksRootVC.mm | 2 | ||||
-rw-r--r-- | iphone/Maps/Bookmarks/PlacePageVC.mm | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/iphone/Maps/Bookmarks/BookmarksRootVC.mm b/iphone/Maps/Bookmarks/BookmarksRootVC.mm index 65ec6a4278..cf8c8b11f5 100644 --- a/iphone/Maps/Bookmarks/BookmarksRootVC.mm +++ b/iphone/Maps/Bookmarks/BookmarksRootVC.mm @@ -137,6 +137,7 @@ UITextField * f = [[[UITextField alloc] initWithFrame:r] autorelease]; f.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; f.returnKeyType = UIReturnKeyDone; + f.enablesReturnKeyAutomatically = YES; f.clearButtonMode = UITextFieldViewModeWhileEditing; f.autocorrectionType = UITextAutocorrectionTypeNo; f.adjustsFontSizeToFitWidth = YES; @@ -151,7 +152,6 @@ cell.accessoryType = UITableViewCellAccessoryNone; [cell.contentView addSubview:f]; [f becomeFirstResponder]; -// f.textAlignment = UITextAlignmentCenter; } else { diff --git a/iphone/Maps/Bookmarks/PlacePageVC.mm b/iphone/Maps/Bookmarks/PlacePageVC.mm index 3f30b2ce9d..8da111f319 100644 --- a/iphone/Maps/Bookmarks/PlacePageVC.mm +++ b/iphone/Maps/Bookmarks/PlacePageVC.mm @@ -138,6 +138,7 @@ cell.contentView.frame.size.width - 3 * padding - leftR.size.width, leftR.size.height); UITextField * f = [[[UITextField alloc] initWithFrame:r] autorelease]; f.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + f.enablesReturnKeyAutomatically = YES; f.returnKeyType = UIReturnKeyDone; f.clearButtonMode = UITextFieldViewModeWhileEditing; f.autocorrectionType = UITextAutocorrectionTypeNo; |