diff --git a/Signal/src/ViewControllers/HomeView/HomeViewController.m b/Signal/src/ViewControllers/HomeView/HomeViewController.m index 96125433d..48ac417d3 100644 --- a/Signal/src/ViewControllers/HomeView/HomeViewController.m +++ b/Signal/src/ViewControllers/HomeView/HomeViewController.m @@ -378,7 +378,10 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) { emptyInboxImageView.layer.minificationFilter = kCAFilterTrilinear; emptyInboxImageView.layer.magnificationFilter = kCAFilterTrilinear; [emptyInboxImageView autoPinToAspectRatioWithSize:emptyInboxImageView.image.size]; - + CGSize screenSize = UIScreen.mainScreen.bounds.size; + CGFloat emptyInboxImageSize = MIN(screenSize.width, screenSize.height) * 0.65f; + [emptyInboxImageView autoSetDimension:ALDimensionWidth toSize:emptyInboxImageSize]; + UILabel *emptyInboxLabel = [UILabel new]; emptyInboxLabel.text = NSLocalizedString(@"INBOX_VIEW_EMPTY_INBOX", @"Message shown in the home view when the inbox is empty."); @@ -444,7 +447,7 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) { }; [layerView addSubview:label]; - [label ows_autoPinToSuperviewMargins]; + [label autoPinEdgesToSuperviewMargins]; layerView.userInteractionEnabled = YES; [layerView diff --git a/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift b/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift index 0918bd78e..3f6bd3672 100644 --- a/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift +++ b/Signal/src/ViewControllers/Registration/Onboarding2FAViewController.swift @@ -73,7 +73,6 @@ public class Onboarding2FAViewController: OnboardingBaseViewController { explanationLabel1, UIView.spacer(withHeight: 10), explanationLabel2, - topSpacer, pinTextField, UIView.spacer(withHeight: 10), @@ -85,7 +84,7 @@ public class Onboarding2FAViewController: OnboardingBaseViewController { ]) stackView.axis = .vertical stackView.alignment = .fill - stackView.layoutMargins = UIEdgeInsets(top: 20, left: 32, bottom: 20, right: 32) + stackView.layoutMargins = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16) stackView.isLayoutMarginsRelativeArrangement = true view.addSubview(stackView) stackView.autoPinWidthToSuperview() diff --git a/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift index ee9f380b0..a1594d3ec 100644 --- a/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift +++ b/Signal/src/ViewControllers/Registration/OnboardingBaseViewController.swift @@ -86,6 +86,8 @@ public class OnboardingBaseViewController: OWSViewController { } else { owsFailDebug("Missing or invalid navigationController") } + + view.layoutIfNeeded() } public override func viewDidAppear(_ animated: Bool) { diff --git a/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift index e43d9f2e3..4388cfea4 100644 --- a/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift +++ b/Signal/src/ViewControllers/Registration/OnboardingVerificationViewController.swift @@ -318,7 +318,7 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController ]) stackView.axis = .vertical stackView.alignment = .fill - stackView.layoutMargins = UIEdgeInsets(top: 32, left: 32, bottom: 32, right: 32) + stackView.layoutMargins = UIEdgeInsets(top: 16, left: 16, bottom: 16, right: 16) stackView.isLayoutMarginsRelativeArrangement = true view.addSubview(stackView) stackView.autoPinWidthToSuperview() @@ -437,6 +437,8 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController } } + // MARK: - View Lifecycle + public override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) @@ -491,7 +493,7 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController Logger.info("") guard onboardingCodeView.isComplete else { - self.setHasInvalidCode(true) + self.setHasInvalidCode(false) return } @@ -499,7 +501,12 @@ public class OnboardingVerificationViewController: OnboardingBaseViewController onboardingController.update(verificationCode: onboardingCodeView.verificationCode) + // Temporarily hide the "resend link" button during the verification attempt. + codeStateLink?.layer.opacity = 0.05 + onboardingController.tryToVerify(fromViewController: self, completion: { (outcome) in + self.codeStateLink?.layer.opacity = 1 + if outcome == .invalidVerificationCode { self.setHasInvalidCode(true) } diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 799bd1eba..2e181fddc 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -1551,7 +1551,7 @@ "ONBOARDING_SPLASH_TERM_AND_PRIVACY_POLICY" = "Terms & Privacy Policy"; /* Title of the 'onboarding splash' view. */ -"ONBOARDING_SPLASH_TITLE" = "Signal is the private messenger for everybody"; +"ONBOARDING_SPLASH_TITLE" = "Take privacy with you.\nBe yourself in every message."; /* Label for the link that lets users change their phone number in the onboarding views. */ "ONBOARDING_VERIFICATION_BACK_LINK" = "Wrong number?";