Skip to content
Permalink
Browse files

Sample project update.

Increase version.
  • Loading branch information...
oleghnidets committed Sep 14, 2018
1 parent 83d8cb3 commit fd237ce2c8df9a6eeb9a67f9abb6e39de6127c57
@@ -4,7 +4,7 @@

Pod::Spec.new do |s|
s.name = 'TweeTextField'
s.version = '1.3.2'
s.version = '1.4.0'
s.summary = 'Lightweight set of attributed text fields with nice animation'
s.description = <<-DESC
This is lightweight library that provides different types of Text Fields based on your needs. I was inspired by https://uimovement.com/ui/2524/input-field-help/.
@@ -17,6 +17,7 @@
7C065D3B20E3F02C00B8F983 /* FontAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A1460B1FEC228900CEADAA /* FontAnimation.swift */; };
7C15066C214BF43D006A7D4C /* WeakTargetProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C15066B214BF43D006A7D4C /* WeakTargetProxy.swift */; };
7C15066D214BF47E006A7D4C /* WeakTargetProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C15066B214BF43D006A7D4C /* WeakTargetProxy.swift */; };
7C15066F214BF500006A7D4C /* AnimatedTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C15066E214BF500006A7D4C /* AnimatedTextField.swift */; };
7CF5909A2125DB5D0015777F /* PasswordTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CF590992125DB5D0015777F /* PasswordTextField.swift */; };
92A1460C1FEC228900CEADAA /* TweePlaceholderTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A146071FEC228900CEADAA /* TweePlaceholderTextField.swift */; };
92A1460D1FEC228900CEADAA /* TweeBorderedTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92A146081FEC228900CEADAA /* TweeBorderedTextField.swift */; };
@@ -59,6 +60,7 @@
7C065D2D20E3EFCD00B8F983 /* TweeTextField.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TweeTextField.h; sourceTree = "<group>"; };
7C065D2E20E3EFCD00B8F983 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
7C15066B214BF43D006A7D4C /* WeakTargetProxy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeakTargetProxy.swift; sourceTree = "<group>"; };
7C15066E214BF500006A7D4C /* AnimatedTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimatedTextField.swift; sourceTree = "<group>"; };
7CF590992125DB5D0015777F /* PasswordTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordTextField.swift; sourceTree = "<group>"; };
92A146071FEC228900CEADAA /* TweePlaceholderTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TweePlaceholderTextField.swift; sourceTree = "<group>"; };
92A146081FEC228900CEADAA /* TweeBorderedTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TweeBorderedTextField.swift; sourceTree = "<group>"; };
@@ -155,6 +157,7 @@
92E7FC3D1FE0374600E58DF5 /* Main.storyboard */,
92E7FC3B1FE0374600E58DF5 /* ViewController.swift */,
7CF590992125DB5D0015777F /* PasswordTextField.swift */,
7C15066E214BF500006A7D4C /* AnimatedTextField.swift */,
);
path = TweeTextField;
sourceTree = "<group>";
@@ -307,6 +310,7 @@
7C065D3920E3F02C00B8F983 /* TweeAttributedTextField.swift in Sources */,
7C065D3A20E3F02C00B8F983 /* TweeActiveTextField.swift in Sources */,
7C065D3B20E3F02C00B8F983 /* FontAnimation.swift in Sources */,
7C15066F214BF500006A7D4C /* AnimatedTextField.swift in Sources */,
7C15066C214BF43D006A7D4C /* WeakTargetProxy.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -45,6 +45,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableAddressSanitizer = "YES"
enableASanStackUseAfterReturn = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
@@ -0,0 +1,37 @@
// Created by Oleg H. on 9/14/18.
// Copyright © 2018 Oleg Gnidets. All rights reserved.
//
import UIKit

class AnimatedTextField: TweeAttributedTextField {
override func awakeFromNib() {
super.awakeFromNib()

NotificationCenter.default.addObserver(
self,
selector: #selector(startEditing),
name: .UITextFieldTextDidBeginEditing,
object: self
)

NotificationCenter.default.addObserver(
self,
selector: #selector(endEditingText),
name: .UITextFieldTextDidEndEditing,
object: self
)
}

@objc private func startEditing() {
placeholderLabel.textColor = .red
}

@objc private func endEditingText() {
if let text = text, !text.isEmpty {
placeholderLabel.textColor = .red
} else {
placeholderLabel.textColor = .gray
}
}
}
@@ -95,7 +95,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ipt-cn-CA9" customClass="TweeAttributedTextField" customModule="TweeTextField_Sample" customModuleProvider="target">
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="ipt-cn-CA9" customClass="AnimatedTextField" customModule="TweeTextField">
<rect key="frame" x="0.0" y="120" width="337.5" height="40"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="ZjG-ZS-5Tb"/>

0 comments on commit fd237ce

Please sign in to comment.
You can’t perform that action at this time.