diff --git a/AnimatedTextInput.podspec b/AnimatedTextInput.podspec index 3efbbbf..701be2a 100644 --- a/AnimatedTextInput.podspec +++ b/AnimatedTextInput.podspec @@ -16,7 +16,8 @@ DESC s.source = { :git => 'https://github.com/jobandtalent/AnimatedTextInput.git', :tag => s.version.to_s } s.social_media_url = 'https://twitter.com/jobandtalentEng' - s.ios.deployment_target = '8.0' + s.ios.deployment_target = '10.0' + s.swift_version = '5.0' s.source_files = 'AnimatedTextInput/Classes/**/*' diff --git a/AnimatedTextInput/Assets/cm_icon_input_eye_normal@2x.png b/AnimatedTextInput/Assets/cm_icon_input_eye_normal@2x.png index 6bbe817..25bf26e 100644 Binary files a/AnimatedTextInput/Assets/cm_icon_input_eye_normal@2x.png and b/AnimatedTextInput/Assets/cm_icon_input_eye_normal@2x.png differ diff --git a/AnimatedTextInput/Assets/cm_icon_input_eye_normal@3x.png b/AnimatedTextInput/Assets/cm_icon_input_eye_normal@3x.png index 096ebef..dd811b7 100644 Binary files a/AnimatedTextInput/Assets/cm_icon_input_eye_normal@3x.png and b/AnimatedTextInput/Assets/cm_icon_input_eye_normal@3x.png differ diff --git a/AnimatedTextInput/Assets/cm_icon_input_eye_selected@2x.png b/AnimatedTextInput/Assets/cm_icon_input_eye_selected@2x.png index e706ed3..b415bdd 100644 Binary files a/AnimatedTextInput/Assets/cm_icon_input_eye_selected@2x.png and b/AnimatedTextInput/Assets/cm_icon_input_eye_selected@2x.png differ diff --git a/AnimatedTextInput/Assets/cm_icon_input_eye_selected@3x.png b/AnimatedTextInput/Assets/cm_icon_input_eye_selected@3x.png index 2dabd5f..2f041a2 100644 Binary files a/AnimatedTextInput/Assets/cm_icon_input_eye_selected@3x.png and b/AnimatedTextInput/Assets/cm_icon_input_eye_selected@3x.png differ diff --git a/AnimatedTextInput/Assets/disclosure@2x.png b/AnimatedTextInput/Assets/disclosure@2x.png index d55f72d..6399fed 100644 Binary files a/AnimatedTextInput/Assets/disclosure@2x.png and b/AnimatedTextInput/Assets/disclosure@2x.png differ diff --git a/AnimatedTextInput/Assets/disclosure@3x.png b/AnimatedTextInput/Assets/disclosure@3x.png index f184851..7b093fb 100644 Binary files a/AnimatedTextInput/Assets/disclosure@3x.png and b/AnimatedTextInput/Assets/disclosure@3x.png differ diff --git a/AnimatedTextInput/Classes/AnimatedLine.swift b/AnimatedTextInput/Classes/AnimatedLine.swift index e52b0ca..70aa5e3 100644 --- a/AnimatedTextInput/Classes/AnimatedLine.swift +++ b/AnimatedTextInput/Classes/AnimatedLine.swift @@ -9,7 +9,7 @@ open class AnimatedLine: UIView { fileprivate let lineLayer = CAShapeLayer() - var animationDuration: Double = 0.4 + var animationDuration: Double = 0.35 var defaultColor = UIColor.gray.withAlphaComponent(0.6) { didSet { diff --git a/AnimatedTextInput/Classes/AnimatedTextField.swift b/AnimatedTextInput/Classes/AnimatedTextField.swift index b437afd..61f3947 100755 --- a/AnimatedTextInput/Classes/AnimatedTextField.swift +++ b/AnimatedTextInput/Classes/AnimatedTextField.swift @@ -19,6 +19,7 @@ final public class AnimatedTextField: UITextField { public var contentInset: UIEdgeInsets = .zero fileprivate var disclosureButtonAction: (() -> Void)? + fileprivate let semaphore = DispatchSemaphore(value: 1) override public init(frame: CGRect) { self.rightViewPadding = defaultPadding diff --git a/AnimatedTextInput/Classes/AnimatedTextInput.swift b/AnimatedTextInput/Classes/AnimatedTextInput.swift index 245eb99..c09e7ac 100755 --- a/AnimatedTextInput/Classes/AnimatedTextInput.swift +++ b/AnimatedTextInput/Classes/AnimatedTextInput.swift @@ -53,20 +53,22 @@ open class AnimatedTextInput: UIControl { } } - open var placeHolderText = "Test" { - didSet { - placeholderLayer.string = placeHolderText - textInput.view.accessibilityLabel = placeHolderText + open var placeHolderText: String { + get { + placeholderLayer.string as? String ?? "" + } + set { + placeholderLayer.string = newValue + textInput.view.accessibilityLabel = newValue } } // Some letters like 'g' or 'รก' were not rendered properly, the frame need to be about 20% higher than the font size - open var frameHeightCorrectionFactor : Double = 1.2 { + open var frameHeightCorrectionFactor: Double = 1.2 { didSet { layoutPlaceholderLayer() } - } open var placeholderAlignment: CATextLayer.Alignment = .natural { @@ -83,11 +85,15 @@ open class AnimatedTextInput: UIControl { open var text: String? { get { - return textInput.currentText + textQueue.sync { + return textInput.currentText + } } set { - (newValue != nil && !newValue!.isEmpty) ? configurePlaceholderAsInactiveHint() : configurePlaceholderAsDefault() - textInput.currentText = newValue + textQueue.sync { + newValue?.isEmpty ?? true ? configurePlaceholderAsDefault() : configurePlaceholderAsInactiveHint() + textInput.currentText = newValue + } } } @@ -188,16 +194,30 @@ open class AnimatedTextInput: UIControl { } } - open var contentInset: UIEdgeInsets? { - didSet { - guard let insets = contentInset else { return } - textInput.contentInset = insets + open var contentInset: UIEdgeInsets { + get { + if let textInput = textInput as? UITextView { + var textContainerInset = textInput.contentInset + textContainerInset.left += 4 + return textContainerInset + } else { + return textInput.contentInset + } + } + set { + if let textInput = textInput as? UITextView { + textInput.contentInset = newValue + textInput.contentInset.left -= 4 + } else { + textInput.contentInset = newValue + } } } fileprivate let lineView = AnimatedLine() fileprivate let placeholderLayer = CATextLayer() fileprivate let counterLabel = UILabel() + fileprivate let textQueue = DispatchQueue(label: "AnimatedTextInput.text") fileprivate let counterLabelRightMargin: CGFloat = 15 fileprivate let counterLabelTopMargin: CGFloat = 5 @@ -211,6 +231,7 @@ open class AnimatedTextInput: UIControl { fileprivate var disclosureView: UIView? fileprivate var placeholderErrorText: String? + fileprivate var placeholderPosition: CGPoint { let hintPosition = CGPoint( x: placeholderAlignment != .natural ? 0 : style.leftMargin, @@ -541,6 +562,10 @@ open class AnimatedTextInput: UIControl { open func position(from: UITextPosition, offset: Int) -> UITextPosition? { return textInput.currentPosition(from: from, offset: offset) } + + open func textRange(from fromPosition: UITextPosition, to toPosition: UITextPosition) -> UITextRange? { + return textInput.textRange(from: fromPosition, to: toPosition) + } } extension AnimatedTextInput: TextInputDelegate { @@ -596,6 +621,7 @@ public protocol TextInput { func configureInputView(newInputView: UIView) func changeReturnKeyType(with newReturnKeyType: UIReturnKeyType) func currentPosition(from: UITextPosition, offset: Int) -> UITextPosition? + func textRange(from fromPosition: UITextPosition, to toPosition: UITextPosition) -> UITextRange? func changeClearButtonMode(with newClearButtonMode: UITextField.ViewMode) } diff --git a/AnimatedTextInput/Classes/AnimatedTextView.swift b/AnimatedTextInput/Classes/AnimatedTextView.swift index f5ccc35..b84b3f4 100755 --- a/AnimatedTextInput/Classes/AnimatedTextView.swift +++ b/AnimatedTextInput/Classes/AnimatedTextView.swift @@ -32,7 +32,7 @@ final public class AnimatedTextView: UITextView { } fileprivate func setup() { - contentInset = UIEdgeInsets(top: 0, left: -4, bottom: 0, right: 0) + contentInset.left = -4 delegate = self } diff --git a/Assets/Jobandtalent Eng.png b/Assets/Jobandtalent Eng.png index 5ab1f01..e849187 100644 Binary files a/Assets/Jobandtalent Eng.png and b/Assets/Jobandtalent Eng.png differ diff --git a/Example/AnimatedTextInput.xcodeproj/project.pbxproj b/Example/AnimatedTextInput.xcodeproj/project.pbxproj index 72a1b88..6fed6ae 100644 --- a/Example/AnimatedTextInput.xcodeproj/project.pbxproj +++ b/Example/AnimatedTextInput.xcodeproj/project.pbxproj @@ -49,7 +49,7 @@ 996E6CB407C8BE1F63C6A8EB /* Pods-AnimatedTextInput_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AnimatedTextInput_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-AnimatedTextInput_Tests/Pods-AnimatedTextInput_Tests.release.xcconfig"; sourceTree = ""; }; C2CC3D147049263CCC7FACAE /* Pods_AnimatedTextInput_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AnimatedTextInput_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C70CECE01EB0E27100BB92A9 /* SnapshotTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SnapshotTests.swift; sourceTree = ""; }; - FC96906680158A6AEBA30E7E /* AnimatedTextInput.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = AnimatedTextInput.podspec; path = ../AnimatedTextInput.podspec; sourceTree = ""; }; + FC96906680158A6AEBA30E7E /* AnimatedTextInput.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = AnimatedTextInput.podspec; path = ../AnimatedTextInput.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -206,24 +206,24 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1030; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; DevelopmentTeam = 49LW9LE429; - LastSwiftMigration = 0810; + LastSwiftMigration = 1170; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0900; + LastSwiftMigration = 1170; TestTargetID = 607FACCF1AFB9204008FA782; }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "AnimatedTextInput" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -286,7 +286,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-AnimatedTextInput_Example/Pods-AnimatedTextInput_Example-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-AnimatedTextInput_Example/Pods-AnimatedTextInput_Example-frameworks.sh", "${BUILT_PRODUCTS_DIR}/AnimatedTextInput/AnimatedTextInput.framework", ); name = "[CP] Embed Pods Frameworks"; @@ -295,7 +295,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AnimatedTextInput_Example/Pods-AnimatedTextInput_Example-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AnimatedTextInput_Example/Pods-AnimatedTextInput_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; B3BF15F5F058B84F66980FC9 /* [CP] Embed Pods Frameworks */ = { @@ -304,7 +304,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-AnimatedTextInput_Tests/Pods-AnimatedTextInput_Tests-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-AnimatedTextInput_Tests/Pods-AnimatedTextInput_Tests-frameworks.sh", "${BUILT_PRODUCTS_DIR}/AnimatedTextInput/AnimatedTextInput.framework", "${BUILT_PRODUCTS_DIR}/FBSnapshotTestCase/FBSnapshotTestCase.framework", "${BUILT_PRODUCTS_DIR}/KIF/KIF.framework", @@ -317,7 +317,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AnimatedTextInput_Tests/Pods-AnimatedTextInput_Tests-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AnimatedTextInput_Tests/Pods-AnimatedTextInput_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; CAC4E7ECBA55CDF296E15A0A /* [CP] Check Pods Manifest.lock */ = { @@ -424,6 +424,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -467,7 +468,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -480,6 +481,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -516,7 +518,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; @@ -533,11 +535,12 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 49LW9LE429; INFOPLIST_FILE = AnimatedTextInput/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -549,11 +552,12 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 49LW9LE429; INFOPLIST_FILE = AnimatedTextInput/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -578,7 +582,7 @@ SWIFT_OBJC_BRIDGING_HEADER = "../Tests/AnimatedTextInput_Tests-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AnimatedTextInput_Example.app/AnimatedTextInput_Example"; }; name = Debug; @@ -599,7 +603,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "../Tests/AnimatedTextInput_Tests-Bridging-Header.h"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AnimatedTextInput_Example.app/AnimatedTextInput_Example"; }; name = Release; diff --git a/Example/AnimatedTextInput.xcodeproj/xcshareddata/xcschemes/AnimatedTextInput-Example.xcscheme b/Example/AnimatedTextInput.xcodeproj/xcshareddata/xcschemes/AnimatedTextInput-Example.xcscheme index 239abf3..1b1ba9d 100644 --- a/Example/AnimatedTextInput.xcodeproj/xcshareddata/xcschemes/AnimatedTextInput-Example.xcscheme +++ b/Example/AnimatedTextInput.xcodeproj/xcshareddata/xcschemes/AnimatedTextInput-Example.xcscheme @@ -1,6 +1,6 @@ Bool { - // Override point for customization after application launch. + internal func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { return true } - - func applicationWillResignActive(_ application: UIApplication) { - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - } - - func applicationDidEnterBackground(_ application: UIApplication) { - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. - } - - func applicationWillEnterForeground(_ application: UIApplication) { - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. - } - - func applicationDidBecomeActive(_ application: UIApplication) { - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - } - - func applicationWillTerminate(_ application: UIApplication) { - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. - } - - } diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextFieldActiveCustomStyle@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextFieldActiveCustomStyle@3x.png index 2273a61..9f3dd6d 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextFieldActiveCustomStyle@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextFieldActiveCustomStyle@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextViewActiveCustomStyle@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextViewActiveCustomStyle@3x.png index 387d595..bd81b36 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextViewActiveCustomStyle@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testAnimatedTextViewActiveCustomStyle@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldActive@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldActive@3x.png index 28aed80..b2caa97 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldActive@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldActive@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldInactive@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldInactive@3x.png index 280165b..4448e32 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldInactive@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testContentInsetTextFieldInactive@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveState@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveState@3x.png index 5915faa..54b6698 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveState@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveState@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveStateMultiline@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveStateMultiline@3x.png index fa44381..ae8271b 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveStateMultiline@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testEmptyActiveStateMultiline@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveState@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveState@3x.png index ebdb286..e21f5be 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveState@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveState@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultiline@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultiline@3x.png index 1f989d5..1bd586c 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultiline@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultiline@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultilineWithCounter@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultilineWithCounter@3x.png index 464b119..ce72bb5 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultilineWithCounter@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testFilledActiveStateMultilineWithCounter@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledState@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledState@3x.png index 6ab69b1..bff23a7 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledState@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledState@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateMultiline@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateMultiline@3x.png index f43a12c..ed93edb 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateMultiline@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateMultiline@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateSelection@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateSelection@3x.png index 79abd89..5face3b 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateSelection@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testInactiveFilledStateSelection@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalState@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalState@3x.png index 04d6a2b..c481be9 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalState@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalState@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateMultiline@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateMultiline@3x.png index b05179e..286881d 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateMultiline@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateMultiline@3x.png differ diff --git a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateSelection@3x.png b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateSelection@3x.png index 179cab2..432cd75 100644 Binary files a/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateSelection@3x.png and b/Example/AnimatedTextInputTests/ReferenceImages_64/AnimatedTextInput_Tests.AnimatedTextInputSnapshotTests/testNormalStateSelection@3x.png differ diff --git a/Example/Podfile b/Example/Podfile index 4751756..4a1297f 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,4 +1,4 @@ -platform :ios, '8.3' +platform :ios, '10.0' use_frameworks! inhibit_all_warnings! @@ -12,11 +12,3 @@ target 'AnimatedTextInput_Tests' do pod 'KIF', '~> 3.5' pod 'FBSnapshotTestCase' end - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.2' - end - end -end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 40a5837..fafa720 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -15,7 +15,7 @@ DEPENDENCIES: - KIF (~> 3.5) SPEC REPOS: - https://github.com/cocoapods/specs: + https://github.com/CocoaPods/Specs.git: - FBSnapshotTestCase - KIF @@ -24,10 +24,10 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - AnimatedTextInput: 81da570f4e0ca74e3092dfe235781f8c2aa18c30 + AnimatedTextInput: f3f55cc027cf7a38e62e920eaedb22e9ae8d883c FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a KIF: bd770edd8ce49bc7308501e4871e58a02d137be3 -PODFILE CHECKSUM: 24f7e98a4a8a1102c54d1de65b58fd857224cd7d +PODFILE CHECKSUM: dc47b2c2e48f7d8677de2eb6d4dfe24f10a1dcfc -COCOAPODS: 1.5.3 +COCOAPODS: 1.9.3 diff --git a/Tests/SnapshotTests.swift b/Tests/SnapshotTests.swift index 7c42e09..c3a07cf 100644 --- a/Tests/SnapshotTests.swift +++ b/Tests/SnapshotTests.swift @@ -4,7 +4,7 @@ import AnimatedTextInput class AnimatedTextInputSnapshotTests: FBSnapshotTestCase { private let sut = AnimatedTextInput() - private var containerView: UIView! + private var containerView = UIView() override func setUp() { super.setUp()