title: iOS - Cannot access UITextView delegate inside a UITableViewCell class
body: <p>I've found some problems when trying to access the <code>UITableViewDelegate</code> methods, inside an instantiated <code>UITableViewCell</code> class.</p>
  
  <p>I'm trying to access the 
  <code>func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -&gt; Bool {}</code>
  and the functions doesn't fire, and I guess that's because I've some issues trying to set the delegate.</p>
  
  <p>The code goes as it follows:</p>
  
  <pre><code>import UIKit
  class TableViewCell: UITableViewCell, UITextViewDelegate {
  
      @IBOutlet var titleLabel: UILabel!
      @IBOutlet var textView: UITextView!
      @IBOutlet var postImageView: UIImageView!
  
  
      func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -&gt; Bool {
          print("link tapped")
          return true
      }
  
      init() {
          super.init()
          textView.delegate = self
      }
  
      required init?(coder aDecoder: NSCoder) {
          fatalError("init(coder:) has not been implemented")
      }
  
  
      override func awakeFromNib() {
          super.awakeFromNib()
      }
  
      override func setSelected(_ selected: Bool, animated: Bool) {
          super.setSelected(selected, animated: animated)
      }
  }
  </code></pre>
  
  <p>On the <code>super.init()</code> line this error is shown </p>
  
  <blockquote>
    <p>TableViewCell.swift - "Must call a designated initializer of the superclass" 'UITableViewCell'</p>
  </blockquote>
  
  <p>Any tip on how to overpass this ?</p>
  
  <p>Thanks in advance</p>
  
  <p><strong>FINAL EDIT</strong>
  I've done what I really wanted to do.
  Instead of using the UITextFieldDelegate inside the UITableViewCell Class, I've added the UITextFieldDelegate to the ViewController that uses the cell itself, and on the cell configuration just did:
  <code>cell.textView.degelate = Self</code> , then I've implemented the delegate function of
  <code>func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange) -&gt; Bool {}</code> </p>
  
  <p>Thanks for answering boys.</p>