Apply design feedback from Myles.

pull/2/head
Matthew Chen
parent 1ec1a9aa63
commit 93e09be18e

@ -23,7 +23,7 @@ public class OnboardingCaptchaViewController: OnboardingBaseViewController {
])
titleRow.axis = .vertical
titleRow.alignment = .fill
titleRow.layoutMargins = UIEdgeInsets(top: 16, left: 16, bottom: 0, right: 16)
titleRow.layoutMargins = UIEdgeInsets(top: 10, left: 0, bottom: 0, right: 0)
titleRow.isLayoutMarginsRelativeArrangement = true
// We want the CAPTCHA web content to "fill the screen (honoring margins)".
@ -71,6 +71,14 @@ public class OnboardingCaptchaViewController: OnboardingBaseViewController {
super.viewWillAppear(animated)
loadContent()
webView?.scrollView.contentOffset = .zero
}
public override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
webView?.scrollView.contentOffset = .zero
}
fileprivate let contentUrl = "https://signalcaptchas.org/registration/generate.html"

@ -353,7 +353,7 @@ public class OnboardingController: NSObject {
let value = try CurrentAppContext().keychainStorage().string(forService: kKeychainService_LastRegistered, key: key)
return value
} catch {
owsFailDebug("Error: \(error)")
// The value may not be present in the keychain.
return nil
}
}

@ -1518,7 +1518,7 @@
"ONBOARDING_2FA_TITLE" = "Registration Lock";
/* Title of the 'onboarding Captcha' view. */
"ONBOARDING_CAPTCHA_TITLE" = "We need to verify that you're human";
"ONBOARDING_CAPTCHA_TITLE" = "Add a touch of humanity to your messages";
/* Label for the 'give access' button in the 'onboarding permissions' view. */
"ONBOARDING_PERMISSIONS_ENABLE_PERMISSIONS_BUTTON" = "Enable Permissions";

@ -3,6 +3,7 @@
//
#import "UIFont+OWS.h"
#import <SignalCoreKit/iOSVersions.h>
NS_ASSUME_NONNULL_BEGIN
@ -106,8 +107,7 @@ NS_ASSUME_NONNULL_BEGIN
static NSDictionary<UIFontTextStyle, NSNumber *> *maxPointSizeMap = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
maxPointSizeMap = @{
UIFontTextStyleLargeTitle : @(40.0),
NSMutableDictionary<UIFontTextStyle, NSNumber *> *map = [@{
UIFontTextStyleTitle1 : @(34.0),
UIFontTextStyleTitle2 : @(28.0),
UIFontTextStyleTitle3 : @(26.0),
@ -117,7 +117,11 @@ NS_ASSUME_NONNULL_BEGIN
UIFontTextStyleFootnote : @(19.0),
UIFontTextStyleCaption1 : @(18.0),
UIFontTextStyleCaption2 : @(17.0),
};
} mutableCopy];
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
map[UIFontTextStyleLargeTitle] = @(40.0);
}
maxPointSizeMap = map;
});
UIFont *font = [UIFont preferredFontForTextStyle:fontTextStyle];
@ -135,7 +139,11 @@ NS_ASSUME_NONNULL_BEGIN
+ (UIFont *)ows_dynamicTypeLargeTitle1ClampedFont
{
return [UIFont preferredFontForTextStyleClamped:UIFontTextStyleLargeTitle];
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(11, 0)) {
return [UIFont preferredFontForTextStyleClamped:UIFontTextStyleLargeTitle];
} else {
return [UIFont preferredFontForTextStyleClamped:UIFontTextStyleTitle1];
}
}
+ (UIFont *)ows_dynamicTypeTitle1ClampedFont

Loading…
Cancel
Save