cell.contentView.viewWithTag gives nil value while loading data in UITableView
<p>I am looking to captured image tap event on the first record of <code>UITableView</code>, when user taps I <code>cell.imageAvtar</code> I just want to capture that event.</p>

<p>This is the code I am using </p>

<pre><code>    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
                let cell = tableView.dequeueReusableCellWithIdentifier("details", forIndexPath: indexPath) as! AccountCell
                if (indexPath.row == 0) {
    (cell.contentView.viewWithTag(101) as! UIImageView).image = UIImage(named: "no_image_available.jpg")
    }
return cell
}
</code></pre>

<p>But <code>(cell.contentView.viewWithTag(101)</code> is returning as <code>nil</code>.I have tried <code>(cell.contentView.viewWithTag(100)</code> tried (cell. imageAvtar.viewWithTag(101) as well.</p>