From ec9538a3e4fe16421d98449d6dd38fa335693fb1 Mon Sep 17 00:00:00 2001 From: Michael Kirk Date: Wed, 7 Mar 2018 11:54:00 -0500 Subject: [PATCH] Fix 2fa registration screen layout Don't obscure message text on smaller form factors Also, disable overzealous assert with non-callkit adapters. The adapter is not a singleton, it gets rebuilt whenever call related privacy settings are triggered. // FREEBIE --- .../src/ViewControllers/OWS2FARegistrationViewController.m | 5 ++++- Signal/src/call/NonCallKitCallUIAdaptee.swift | 2 -- Signal/src/views/PinEntryView.m | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Signal/src/ViewControllers/OWS2FARegistrationViewController.m b/Signal/src/ViewControllers/OWS2FARegistrationViewController.m index 5f1c756bb..5c1a86aa9 100644 --- a/Signal/src/ViewControllers/OWS2FARegistrationViewController.m +++ b/Signal/src/ViewControllers/OWS2FARegistrationViewController.m @@ -74,7 +74,10 @@ NS_ASSUME_NONNULL_BEGIN @"REGISTER_2FA_INSTRUCTIONS", @"Instructions to enter the 'two-factor auth pin' in the 2FA registration view."); // Layout - [entryView autoPinEdgesToSuperviewMargins]; + [entryView autoPinToTopLayoutGuideOfViewController:self withInset:0]; + [entryView autoPinEdgeToSuperviewMargin:ALEdgeLeft]; + [entryView autoPinEdgeToSuperviewMargin:ALEdgeRight]; + [entryView autoPinToBottomLayoutGuideOfViewController:self withInset:0]; } - (void)viewWillAppear:(BOOL)animated diff --git a/Signal/src/call/NonCallKitCallUIAdaptee.swift b/Signal/src/call/NonCallKitCallUIAdaptee.swift index 07e5ca85e..6572039c7 100644 --- a/Signal/src/call/NonCallKitCallUIAdaptee.swift +++ b/Signal/src/call/NonCallKitCallUIAdaptee.swift @@ -26,8 +26,6 @@ class NonCallKitCallUIAdaptee: NSObject, CallUIAdaptee { self.notificationsAdapter = notificationsAdapter super.init() - - SwiftSingletons.register(self) } func startOutgoingCall(handle: String) -> SignalCall { diff --git a/Signal/src/views/PinEntryView.m b/Signal/src/views/PinEntryView.m index daa1c50c4..f15de92f9 100644 --- a/Signal/src/views/PinEntryView.m +++ b/Signal/src/views/PinEntryView.m @@ -116,7 +116,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)createContents { - const CGFloat kVSpacing = 30.f; + const CGFloat kVSpacing = ScaleFromIPhone5(12); UILabel *instructionsLabel = [self createLabelWithText:nil]; self.instructionsLabel = instructionsLabel;