title: Didn't receive Notification Center Observer Swift
body: <p>Here I created a <em>customView: UIView</em> and implemented <strong>UITextField didBegin and didEnd notificationObservers</strong></p>
  
  <p>When set object as nil. <strong>I'm get triggered notificationObserved(_:)</strong></p>
  
  <p>But When I pass a (<em>object: self</em>) <strong>I didn't receive notificationObserved.</strong></p>
  
  <pre><code>class CustomView: UIView {
    func setupView() {
  
          [UITextField.textDidBeginEditingNotification,
           UITextField.textDidEndEditingNotification].forEach({
  
              NotificationCenter.default.addObserver(self, selector: #selector(notificationObserved(_:)), name: $0, object: self)
           })
      }
  
   @objc func notificationObserved(_ notified: Notification) {
  
          switch notified.name {
          case UITextField.textDidBeginEditingNotification:
                  // Do here
  
          case UITextField.textDidEndEditingNotification:
                 // Do here
          default:
              break
          }
      }
  }
  </code></pre>