title: Swift - Set different max length to two input fields inside of one ViewController
body: <p>My intention is to set two different max length values to two input fields, <code>notifTitle</code> and <code>notifDescribtion</code>. </p>
  
  <p>So far I have:</p>
  
  <pre><code> extension CreateNotViewController: UITextFieldDelegate {
      func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -&gt; Bool {
          let maxLength = 15
          let currenString: NSString = textField.text! as NSString
          let newString: NSString = currenString.replacingCharacters(in: range, with: string) as NSString
  
          return newString.length &lt;= maxLength
      }
  }
  </code></pre>
  
  <pre><code>override func viewDidLoad() {
          super.viewDidLoad()
          notifTitle.delegate = self
          ...
      }
  </code></pre>
  
  <p>Now if I also add <code>notifDescribtion.delegate = self</code>, its max length is also set to 15 characters. How am I able to set the max length individually for each input field. </p>