     }
     
     private func commonInit() {
+        #if swift(>=4.2)
+        let notificationName = UITextView.textDidChangeNotification
+        #else
+        let notificationName = NSNotification.Name.UITextViewTextDidChange
+        #endif
+      
         NotificationCenter.default.addObserver(self,
             selector: #selector(textDidChange),
-            name: NSNotification.Name.UITextViewTextDidChange,
+            name: notificationName,
             object: nil)
         
         placeholderLabel.font = font

    }
    
    deinit {
        NotificationCenter.default.removeObserver(self,
            name: NSNotification.Name.UITextViewTextDidChange,
            object: nil)
    }
    

    private struct Constants {
        static let defaultiOSPlaceholderColor = UIColor(red: 0.0, green: 0.0, blue: 0.0980392, alpha: 0.22)
    }
  
    public let placeholderLabel: UILabel = UILabel()
    
    private var placeholderLabelConstraints = [NSLayoutConstraint]()
    
