[ios] Added keyboard type to editor fields.

This commit is contained in:
Ilya Grechuhin 2016-01-27 15:50:42 +03:00 committed by Sergey Yershov
parent 3b6bbe88f2
commit 8f4e781a41
3 changed files with 8 additions and 0 deletions

View file

@ -6,6 +6,7 @@
icon:(UIImage *)icon
text:(NSString *)text
placeholder:(NSString *)placeholder
keyboardType:(UIKeyboardType)keyboardType
lastCell:(BOOL)lastCell;
@end

View file

@ -19,6 +19,7 @@
icon:(UIImage *)icon
text:(NSString *)text
placeholder:(NSString *)placeholder
keyboardType:(UIKeyboardType)keyboardType
lastCell:(BOOL)lastCell
{
self.delegate = delegate;
@ -29,6 +30,7 @@
self.backgroundColor = isNameCell ? [UIColor clearColor] : [UIColor white];
self.textField.text = text;
self.textField.placeholder = placeholder;
self.textField.keyboardType = keyboardType;
self.bottomSeparatorLeadingOffset.priority = lastCell ? UILayoutPriorityDefaultHigh : UILayoutPriorityDefaultLow;
}

View file

@ -272,6 +272,7 @@ NSString * reuseIdentifier(MWMPlacePageCellType cellType)
icon:[UIImage imageNamed:@"ic_placepage_phone_number"]
text:entityValue
placeholder:L(@"phone")
keyboardType:UIKeyboardTypePhonePad
lastCell:lastCell];
break;
}
@ -282,6 +283,7 @@ NSString * reuseIdentifier(MWMPlacePageCellType cellType)
icon:[UIImage imageNamed:@"ic_placepage_website"]
text:entityValue
placeholder:L(@"website")
keyboardType:UIKeyboardTypeURL
lastCell:lastCell];
break;
}
@ -292,6 +294,7 @@ NSString * reuseIdentifier(MWMPlacePageCellType cellType)
icon:[UIImage imageNamed:@"ic_placepage_email"]
text:entityValue
placeholder:L(@"email")
keyboardType:UIKeyboardTypeEmailAddress
lastCell:lastCell];
break;
}
@ -320,6 +323,7 @@ NSString * reuseIdentifier(MWMPlacePageCellType cellType)
icon:nil
text:entityValue
placeholder:L(@"name")
keyboardType:UIKeyboardTypeDefault
lastCell:lastCell];
break;
}
@ -340,6 +344,7 @@ NSString * reuseIdentifier(MWMPlacePageCellType cellType)
icon:nil
text:entityValue
placeholder:L(@"building")
keyboardType:UIKeyboardTypeDefault
lastCell:lastCell];
break;
}