Use dismissable text views where cramped on shorter devices

// FREEBIE
pull/1/head
Michael Kirk 7 years ago
parent 958d249ee5
commit 24e675ff07

@ -117,7 +117,12 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
[nameLabel autoPinLeadingToSuperviewMargin]; [nameLabel autoPinLeadingToSuperviewMargin];
[nameLabel autoPinHeightToSuperviewWithMargin:5.f]; [nameLabel autoPinHeightToSuperviewWithMargin:5.f];
UITextField *nameTextField = [UITextField new]; UITextField *nameTextField;
if (UIDevice.currentDevice.isShorterThanIPhone5) {
nameTextField = [DismissableTextField new];
} else {
nameTextField = [UITextField new];
}
_nameTextField = nameTextField; _nameTextField = nameTextField;
nameTextField.font = [UIFont ows_mediumFontWithSize:18.f]; nameTextField.font = [UIFont ows_mediumFontWithSize:18.f];
nameTextField.textColor = [UIColor ows_materialBlueColor]; nameTextField.textColor = [UIColor ows_materialBlueColor];

@ -147,7 +147,12 @@ NS_ASSUME_NONNULL_BEGIN
const CGFloat kHMargin = 36; const CGFloat kHMargin = 36;
_challengeTextField = [UITextField new]; if (UIDevice.currentDevice.isShorterThanIPhone5) {
_challengeTextField = [DismissableTextField new];
} else {
_challengeTextField = [UITextField new];
}
_challengeTextField.textColor = [UIColor blackColor]; _challengeTextField.textColor = [UIColor blackColor];
_challengeTextField.placeholder = NSLocalizedString(@"VERIFICATION_CHALLENGE_DEFAULT_TEXT", _challengeTextField.placeholder = NSLocalizedString(@"VERIFICATION_CHALLENGE_DEFAULT_TEXT",
@"Text field placeholder for SMS verification code during registration"); @"Text field placeholder for SMS verification code during registration");

@ -59,7 +59,12 @@ NS_ASSUME_NONNULL_BEGIN
- (void)createPinTextfield - (void)createPinTextfield
{ {
self.pinTextfield = [UITextField new]; if (UIDevice.currentDevice.isShorterThanIPhone5) {
self.pinTextfield = [DismissableTextField new];
} else {
self.pinTextfield = [UITextField new];
}
self.pinTextfield.textColor = [UIColor blackColor]; self.pinTextfield.textColor = [UIColor blackColor];
self.pinTextfield.font = [UIFont ows_mediumFontWithSize:ScaleFromIPhone5To7Plus(30.f, 36.f)]; self.pinTextfield.font = [UIFont ows_mediumFontWithSize:ScaleFromIPhone5To7Plus(30.f, 36.f)];
self.pinTextfield.textAlignment = NSTextAlignmentCenter; self.pinTextfield.textAlignment = NSTextAlignmentCenter;

Loading…
Cancel
Save