@@ -10,12 +10,12 @@ import UIKit
1010
1111@IBDesignable   public  class  IsaoTextField :  TextFieldEffects  { 
1212
13-  @IBInspectable   var  inactiveColor :  UIColor   =   UIColor ( red :   106 ,  green :   121 ,  blue :   137 ,  alpha :   1 )  { 
13+  @IBInspectable   public   var  inactiveColor :  UIColor ? { 
1414 didSet { 
1515 updateBorder ( ) 
1616 } 
1717 } 
18-  @IBInspectable   var  activeColor :  UIColor   =   UIColor ( red :   106 ,  green :   121 ,  blue :   137 ,  alpha :   1 )  { 
18+  @IBInspectable   public   var  activeColor :  UIColor ? { 
1919 didSet { 
2020 updateBorder ( ) 
2121 } 
@@ -56,7 +56,7 @@ import UIKit
5656
5757 private  func  updateBorder( )  { 
5858 borderLayer. frame =  rectForBorder ( frame) 
59-  borderLayer. backgroundColor =  isFirstResponder ( )  ?  activeColor. CGColor :  inactiveColor. CGColor
59+  borderLayer. backgroundColor =  isFirstResponder ( )  ?  activeColor? . CGColor :  inactiveColor? . CGColor
6060 } 
6161
6262 private  func  updatePlaceholder( )  { 
@@ -109,14 +109,16 @@ import UIKit
109109
110110 override func  animateViewsForTextEntry( )  { 
111111 updateBorder ( ) 
112-  performPlacerholderAnimationWithColor ( activeColor) 
113-  
112+  if  let  activeColor =  activeColor { 
113+  performPlacerholderAnimationWithColor ( activeColor) 
114+  } 
114115 } 
115116
116117 override func  animateViewsForTextDisplay( )  { 
117118 updateBorder ( ) 
118-  performPlacerholderAnimationWithColor ( inactiveColor) 
119-  
119+  if  let  inactiveColor =  inactiveColor { 
120+  performPlacerholderAnimationWithColor ( inactiveColor) 
121+  } 
120122 } 
121123
122124 private  func  performPlacerholderAnimationWithColor( color:  UIColor )  { 
0 commit comments