Swift: Declaring a delegate in Struct
<p>I want to declare a delegate in Swift Struct. For example in viewController you can load delegate:</p>

<pre><code>class ViewController : UIViewController, UITableViewDelegate 
</code></pre>

<p>But in Struct file for example I try to the same :</p>

<pre><code>struct sample:UITableViewDelegate
</code></pre>

<p>But I'm getting this error:</p>

<pre><code>Non-Class type 'sample' cannot conform to class protocol NSObjectProtocol
</code></pre>

<p>How can I add a delegate to Struct file?</p>

<p>I'll really appreciate your help.</p>