diff --git a/WordPressAuthenticator.podspec b/WordPressAuthenticator.podspec index 82f9c6318..a8075cef2 100644 --- a/WordPressAuthenticator.podspec +++ b/WordPressAuthenticator.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "WordPressAuthenticator" - s.version = "1.31.0" + s.version = "1.32.0-beta.1" s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps." s.description = <<-DESC diff --git a/WordPressAuthenticator.xcodeproj/project.pbxproj b/WordPressAuthenticator.xcodeproj/project.pbxproj index b129888eb..a6b29365e 100644 --- a/WordPressAuthenticator.xcodeproj/project.pbxproj +++ b/WordPressAuthenticator.xcodeproj/project.pbxproj @@ -163,6 +163,8 @@ D8610CEC2570A60C00A5DF27 /* NavigationToRootTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8610CEB2570A60C00A5DF27 /* NavigationToRootTests.swift */; }; D8611A63257622ED00A5DF27 /* NavigateBack.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8611A62257622ED00A5DF27 /* NavigateBack.swift */; }; D8611A672576236800A5DF27 /* NavigateBackTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8611A662576236800A5DF27 /* NavigateBackTests.swift */; }; + D87F120B2586DA26005675C5 /* SpacerTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D87F12092586DA26005675C5 /* SpacerTableViewCell.swift */; }; + D87F120C2586DA26005675C5 /* SpacerTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D87F120A2586DA26005675C5 /* SpacerTableViewCell.xib */; }; D881A30D256B5A7900FE5605 /* NavigationCommand.swift in Sources */ = {isa = PBXBuildFile; fileRef = D881A30C256B5A7900FE5605 /* NavigationCommand.swift */; }; D881A311256B5B4700FE5605 /* NavigateToEnterSite.swift in Sources */ = {isa = PBXBuildFile; fileRef = D881A310256B5B4700FE5605 /* NavigateToEnterSite.swift */; }; D881A315256B5B5800FE5605 /* NavigateToEnterAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = D881A314256B5B5800FE5605 /* NavigateToEnterAccount.swift */; }; @@ -375,6 +377,8 @@ D8610CEB2570A60C00A5DF27 /* NavigationToRootTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationToRootTests.swift; sourceTree = ""; }; D8611A62257622ED00A5DF27 /* NavigateBack.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigateBack.swift; sourceTree = ""; }; D8611A662576236800A5DF27 /* NavigateBackTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigateBackTests.swift; sourceTree = ""; }; + D87F12092586DA26005675C5 /* SpacerTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SpacerTableViewCell.swift; sourceTree = ""; }; + D87F120A2586DA26005675C5 /* SpacerTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SpacerTableViewCell.xib; sourceTree = ""; }; D881A30C256B5A7900FE5605 /* NavigationCommand.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationCommand.swift; sourceTree = ""; }; D881A310256B5B4700FE5605 /* NavigateToEnterSite.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigateToEnterSite.swift; sourceTree = ""; }; D881A314256B5B5800FE5605 /* NavigateToEnterAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigateToEnterAccount.swift; sourceTree = ""; }; @@ -876,6 +880,8 @@ CE6BCD3724A3CB5E001BCDC5 /* TextLinkButtonTableViewCell.xib */, 98F40AEF24F5E13200A72911 /* TextWithLinkTableViewCell.swift */, 98F40AEE24F5E13200A72911 /* TextWithLinkTableViewCell.xib */, + D87F12092586DA26005675C5 /* SpacerTableViewCell.swift */, + D87F120A2586DA26005675C5 /* SpacerTableViewCell.xib */, ); path = "Reusable Views"; sourceTree = ""; @@ -1065,6 +1071,7 @@ CE1BBF8D24D48580001D2E3E /* GravatarEmailTableViewCell.xib in Resources */, B560913F208A563800399AE4 /* Login.storyboard in Resources */, CE6BCD3924A3CB5E001BCDC5 /* TextLinkButtonTableViewCell.xib in Resources */, + D87F120C2586DA26005675C5 /* SpacerTableViewCell.xib in Resources */, CE6BCD2F24A3A235001BCDC5 /* TextLabelTableViewCell.xib in Resources */, 98CF18F9248725620047B66C /* GoogleSignupConfirmation.storyboard in Resources */, B5609137208A563800399AE4 /* EmailMagicLink.storyboard in Resources */, @@ -1262,6 +1269,7 @@ 98CF18F7248725370047B66C /* GoogleSignupConfirmationViewController.swift in Sources */, BA53D65324DFEA58001F1ABF /* OnePasswordResultsFetcher.swift in Sources */, 1A21EE9822832BC300C940C6 /* WordPressComOAuthClientFacade+Swift.swift in Sources */, + D87F120B2586DA26005675C5 /* SpacerTableViewCell.swift in Sources */, CEC77C6624854F2E00FB9050 /* SiteAddressViewController.swift in Sources */, CEDE0D952420121D00CB3345 /* UIStoryboard+Helpers.swift in Sources */, B5ED7920207E993E00A8FD8C /* WPAuthenticatorLogging.m in Sources */, diff --git a/WordPressAuthenticator/Unified Auth/View Related/Get Started/GetStartedViewController.swift b/WordPressAuthenticator/Unified Auth/View Related/Get Started/GetStartedViewController.swift index a4a9525aa..fe3a94fac 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/Get Started/GetStartedViewController.swift +++ b/WordPressAuthenticator/Unified Auth/View Related/Get Started/GetStartedViewController.swift @@ -195,7 +195,8 @@ private extension GetStartedViewController { let cells = [ TextLabelTableViewCell.reuseIdentifier: TextLabelTableViewCell.loadNib(), TextFieldTableViewCell.reuseIdentifier: TextFieldTableViewCell.loadNib(), - TextWithLinkTableViewCell.reuseIdentifier: TextWithLinkTableViewCell.loadNib() + TextWithLinkTableViewCell.reuseIdentifier: TextWithLinkTableViewCell.loadNib(), + SpacerTableViewCell.reuseIdentifier: SpacerTableViewCell.loadNib() ] for (reuseIdentifier, nib) in cells { @@ -210,8 +211,10 @@ private extension GetStartedViewController { if let authenticationDelegate = WordPressAuthenticator.shared.delegate, authenticationDelegate.wpcomTermsOfServiceEnabled { rows.append(.tos) + } else { + rows.append(.spacer) } - + if let errorText = errorMessage, !errorText.isEmpty { rows.append(.errorMessage) } @@ -227,6 +230,8 @@ private extension GetStartedViewController { configureEmailField(cell) case let cell as TextWithLinkTableViewCell: configureTextWithLink(cell) + case cell as SpacerTableViewCell: + break case let cell as TextLabelTableViewCell where row == .errorMessage: configureErrorLabel(cell) default: @@ -300,6 +305,7 @@ private extension GetStartedViewController { case instructions case email case tos + case spacer case errorMessage var reuseIdentifier: String { @@ -310,6 +316,8 @@ private extension GetStartedViewController { return TextFieldTableViewCell.reuseIdentifier case .tos: return TextWithLinkTableViewCell.reuseIdentifier + case .spacer: + return SpacerTableViewCell.reuseIdentifier } } } diff --git a/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/SpacerTableViewCell.swift b/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/SpacerTableViewCell.swift new file mode 100644 index 000000000..cfd5f022e --- /dev/null +++ b/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/SpacerTableViewCell.swift @@ -0,0 +1,7 @@ +import UIKit + +/// SpacerTableViewCell: an empty cell, used as separator and to introduce padding. +/// +final class SpacerTableViewCell: UITableViewCell { + static let reuseIdentifier = "SpacerTableViewCell" +} diff --git a/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/SpacerTableViewCell.xib b/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/SpacerTableViewCell.xib new file mode 100644 index 000000000..01a21079d --- /dev/null +++ b/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/SpacerTableViewCell.xib @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/TextWithLinkTableViewCell.swift b/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/TextWithLinkTableViewCell.swift index 5a1a80cbb..5c27c15c5 100644 --- a/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/TextWithLinkTableViewCell.swift +++ b/WordPressAuthenticator/Unified Auth/View Related/Reusable Views/TextWithLinkTableViewCell.swift @@ -41,5 +41,4 @@ class TextWithLinkTableViewCell: UITableViewCell { button.setAttributedTitle(highlightAttributedString, for: .highlighted) button.accessibilityTraits = accessibilityTrait } - }