Skip to content

Commit

Permalink
iOS 11 crash resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
iDhaval committed Oct 14, 2017
1 parent 37062db commit 542b238
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DTTextField.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Pod::Spec.new do |s|

s.name = 'DTTextField'
s.version = '0.2.5'
s.version = '0.2.6'
s.summary = 'DTTextField is UITextField library.'

s.description = <<-DESC
Expand Down
4 changes: 3 additions & 1 deletion DTTextField/Classes/DTTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ public class DTTextField: UITextField {

fileprivate func insetRectForBounds(rect:CGRect) -> CGRect {

guard !lblFloatPlaceholder.text!.isEmptyStr else { return insetRectForEmptyBounds(rect: rect) }
guard let placeholderText = lblFloatPlaceholder.text,!placeholderText.isEmptyStr else {
return insetRectForEmptyBounds(rect: rect)
}

if floatingDisplayStatus == .never {
return insetRectForEmptyBounds(rect: rect)
Expand Down
4 changes: 3 additions & 1 deletion Example/DTTextField/DTTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,9 @@ public class DTTextField: UITextField {

fileprivate func insetRectForBounds(rect:CGRect) -> CGRect {

guard !lblFloatPlaceholder.text!.isEmptyStr else { return insetRectForEmptyBounds(rect: rect) }
guard let placeholderText = lblFloatPlaceholder.text,!placeholderText.isEmptyStr else {
return insetRectForEmptyBounds(rect: rect)
}

if floatingDisplayStatus == .never {
return insetRectForEmptyBounds(rect: rect)
Expand Down

0 comments on commit 542b238

Please sign in to comment.