@@ -31,14 +31,14 @@ public class TextFieldEffects : UITextField {
3131 Creates all the animations that are used to leave the textfield in the "entering text" state.
3232 */
3333 public func animateViewsForTextEntry( ) {
34- fatalError ( " \( __FUNCTION__ ) must be overridden " )
34+ fatalError ( " \( #function ) must be overridden " )
3535 }
3636
3737 /**
3838 Creates all the animations that are used to leave the textfield in the "display input text" state.
3939 */
4040 public func animateViewsForTextDisplay( ) {
41- fatalError ( " \( __FUNCTION__ ) must be overridden " )
41+ fatalError ( " \( #function ) must be overridden " )
4242 }
4343
4444 /**
@@ -47,11 +47,11 @@ public class TextFieldEffects : UITextField {
4747 - parameter rect: The portion of the view’s bounds that needs to be updated.
4848 */
4949 public func drawViewsForRect( rect: CGRect ) {
50- fatalError ( " \( __FUNCTION__ ) must be overridden " )
50+ fatalError ( " \( #function ) must be overridden " )
5151 }
5252
5353 public func updateViewsForBoundsChange( bounds: CGRect ) {
54- fatalError ( " \( __FUNCTION__ ) must be overridden " )
54+ fatalError ( " \( #function ) must be overridden " )
5555 }
5656
5757 // MARK: - Overrides
@@ -78,9 +78,9 @@ public class TextFieldEffects : UITextField {
7878
7979 override public func willMoveToSuperview( newSuperview: UIView ! ) {
8080 if newSuperview != nil {
81- NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: " textFieldDidEndEditing " , name: UITextFieldTextDidEndEditingNotification, object: self )
81+ NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: #selector ( TextFieldEffects . textFieldDidEndEditing) , name: UITextFieldTextDidEndEditingNotification, object: self )
8282
83- NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: " textFieldDidBeginEditing " , name: UITextFieldTextDidBeginEditingNotification, object: self )
83+ NSNotificationCenter . defaultCenter ( ) . addObserver ( self , selector: #selector ( TextFieldEffects . textFieldDidBeginEditing) , name: UITextFieldTextDidBeginEditingNotification, object: self )
8484 } else {
8585 NSNotificationCenter . defaultCenter ( ) . removeObserver ( self )
8686 }
0 commit comments