Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions FloatLabelExample/FloatLabelExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
TargetAttributes = {
DD72F5E61A2845270097D54A = {
CreatedOnToolsVersion = 6.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0910;
};
};
};
Expand Down Expand Up @@ -276,7 +276,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.farook.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -288,7 +289,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.farook.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
10 changes: 5 additions & 5 deletions FloatLabelFields/FloatLabelTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import UIKit
// MARK:- Properties
override var accessibilityLabel:String? {
get {
if let txt = text , txt.isEmpty {
if let txt = text, txt.isEmpty {
return title.text
} else {
return text
}
return text

}
set {
self.accessibilityLabel = newValue
Expand Down Expand Up @@ -177,7 +177,7 @@ import UIKit

fileprivate func showTitle(_ animated:Bool) {
let dur = animated ? animationDuration : 0
UIView.animate(withDuration: dur, delay:0, options: [UIViewAnimationOptions.beginFromCurrentState, UIViewAnimationOptions.curveEaseOut], animations:{
UIView.animate(withDuration: dur, delay:0, options: [.beginFromCurrentState, .curveEaseOut], animations:{
// Animation
self.title.alpha = 1.0
var r = self.title.frame
Expand All @@ -188,7 +188,7 @@ import UIKit

fileprivate func hideTitle(_ animated:Bool) {
let dur = animated ? animationDuration : 0
UIView.animate(withDuration: dur, delay:0, options: [UIViewAnimationOptions.beginFromCurrentState, UIViewAnimationOptions.curveEaseIn], animations:{
UIView.animate(withDuration: dur, delay:0, options: [.beginFromCurrentState, .curveEaseIn], animations:{
// Animation
self.title.alpha = 0.0
var r = self.title.frame
Expand Down
4 changes: 2 additions & 2 deletions FloatLabelFields/FloatLabelTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ import UIKit

fileprivate func showTitle(_ animated:Bool) {
let dur = animated ? animationDuration : 0
UIView.animate(withDuration: dur, delay:0, options: [UIViewAnimationOptions.beginFromCurrentState, UIViewAnimationOptions.curveEaseOut], animations:{
UIView.animate(withDuration: dur, delay:0, options: [.beginFromCurrentState, .curveEaseOut], animations:{
// Animation
self.title.alpha = 1.0
var r = self.title.frame
Expand All @@ -202,7 +202,7 @@ import UIKit

fileprivate func hideTitle(_ animated:Bool) {
let dur = animated ? animationDuration : 0
UIView.animate(withDuration: dur, delay:0, options: [UIViewAnimationOptions.beginFromCurrentState, UIViewAnimationOptions.curveEaseIn], animations:{
UIView.animate(withDuration: dur, delay:0, options: [.beginFromCurrentState, .curveEaseIn], animations:{
// Animation
self.title.alpha = 0.0
var r = self.title.frame
Expand Down