@@ -33,7 +33,7 @@ import UIKit
3333
3434 This property applies a color to the edges of the control. The default value for this property is a clear color.
3535 */
36-  @IBInspectable   dynamic  public  var  activeBorderColor :  UIColor  =  . clear( )  { 
36+  @IBInspectable   dynamic  public  var  activeBorderColor :  UIColor  =  . clear { 
3737 didSet { 
3838 updateBorder ( ) 
3939 updateBackground ( ) 
@@ -46,7 +46,7 @@ import UIKit
4646
4747 This property applies a color to the edges of the control. The default value for this property is a clear color.
4848 */
49-  @IBInspectable   dynamic  public  var  inactiveBorderColor :  UIColor  =  . clear( )  { 
49+  @IBInspectable   dynamic  public  var  inactiveBorderColor :  UIColor  =  . clear { 
5050 didSet { 
5151 updateBorder ( ) 
5252 updateBackground ( ) 
@@ -59,7 +59,7 @@ import UIKit
5959
6060 This property applies a color to the background of the input.
6161 */
62-  @IBInspectable   dynamic  public  var  activeBackgroundColor :  UIColor  =  . clear( )  { 
62+  @IBInspectable   dynamic  public  var  activeBackgroundColor :  UIColor  =  . clear { 
6363 didSet { 
6464 updateBackground ( ) 
6565 } 
@@ -70,7 +70,7 @@ import UIKit
7070
7171 This property applies a color to the complete placeholder string. The default value for this property is a dark gray color.
7272 */
73-  @IBInspectable   dynamic  public  var  placeholderColor :  UIColor  =  . darkGray( )  { 
73+  @IBInspectable   dynamic  public  var  placeholderColor :  UIColor  =  . darkGray { 
7474 didSet { 
7575 updatePlaceholder ( ) 
7676 } 
@@ -98,11 +98,11 @@ import UIKit
9898 private  func  updateBorder( )  { 
9999 borderLayer. frame =  rectForBounds ( bounds) 
100100 borderLayer. borderWidth =  borderSize
101-  borderLayer. borderColor =  ( isFirstResponder ( )  || text!. isNotEmpty)  ?  activeBorderColor. cgColor :  inactiveBorderColor. cgColor
101+  borderLayer. borderColor =  ( isFirstResponder || text!. isNotEmpty)  ?  activeBorderColor. cgColor :  inactiveBorderColor. cgColor
102102 } 
103103
104104 private  func  updateBackground( )  { 
105-  if  isFirstResponder ( )  || text!. isNotEmpty { 
105+  if  isFirstResponder || text!. isNotEmpty { 
106106 borderLayer. backgroundColor =  activeBackgroundColor. cgColor
107107 }  else  { 
108108 borderLayer. backgroundColor =  inactiveBorderColor. cgColor
@@ -114,7 +114,7 @@ import UIKit
114114 placeholderLabel. text =  placeholder
115115 placeholderLabel. textAlignment =  textAlignment
116116
117-  if  isFirstResponder ( )  || text!. isNotEmpty { 
117+  if  isFirstResponder || text!. isNotEmpty { 
118118 placeholderLabel. font =  placeholderFontFromFontAndPercentageOfOriginalSize ( font:  font!,  percentageOfOriginalSize:  placeholderFontScale *  0.8 ) 
119119 placeholderLabel. text =  placeholder? . uppercased ( ) 
120120 placeholderLabel. textColor =  activeBorderColor
@@ -154,7 +154,7 @@ import UIKit
154154 self . updateBorder ( ) 
155155 self . updateBackground ( ) 
156156 } ,  completion:  {  _ in 
157-  self . animationCompletionHandler ? ( type :   self . isFirstResponder ( )  ?  . textEntry :  . textDisplay) 
157+  self . animationCompletionHandler ? ( self . isFirstResponder ?  . textEntry :  . textDisplay) 
158158 } ) 
159159 } 
160160 } 
@@ -189,7 +189,7 @@ import UIKit
189189 } 
190190
191191 public  override func  placeholderRect( forBounds bounds:  CGRect )  ->  CGRect  { 
192-  if  isFirstResponder ( )  || text!. isNotEmpty { 
192+  if  isFirstResponder || text!. isNotEmpty { 
193193 return  CGRect ( x:  placeHolderInsets. x,  y:  placeHolderInsets. y,  width:  bounds. width,  height:  placeholderHeight) 
194194 }  else  { 
195195 return  textRect ( forBounds:  bounds) 
0 commit comments