How to show number of row in section after tapping on section header in swift?
<p>I have a tableView  which contain some </p>

<p><a href="https://i.stack.imgur.com/Rmn1r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rmn1r.png" alt="enter image description here"></a></p>

<p>But i want it to show only section header and when i tap on section header it will show all employee details contining that section only.</p>

<p><a href="https://i.stack.imgur.com/DU8vQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DU8vQ.png" alt="enter image description here"></a></p>

<p>Below is my code:</p>

<pre><code> func numberOfSectionsInTableView(tableView: UITableView) -&gt; Int {
    return company.count
}



 func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {

    return company[section].employees!.count
}


 func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -&gt; String? {

    if company[section].employees!.count &lt; 1 {

        return nil
    }

    return company[section].companyName
}


 func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {

    let cell = tableView.dequeueReusableCellWithIdentifier("cell") as! EmployeeTableViewCell
    let employeeDetails =  company[indexPath.section].employees!.allObjects as! [Employees]

    cell.lblName.text = employeeDetails[indexPath.row].employeeName
    cell.lblAddress.text = String(employeeDetails[indexPath.row].address!)
    cell.lblAge.text = String(employeeDetails[indexPath.row].age!)

    return cell
}
</code></pre>

<p>Thanks!</p>