I would like to know how to create a grouped/sectioned tableview programmatically. The design I am trying to create is this:

[![enter image description here](https://i.stack.imgur.com/j6bL6.jpg)](https://i.stack.imgur.com/j6bL6.jpg)

I want there to be a `UIImageView` at the top with a 160 height, followed by 3 sections, each with a different number of rows. I will then place static labels in each row and then update their labels with my data.

My code for this VC is as follows:

```
import UIKit

class SelectedFilmTableViewController: UITableViewController {

var film: Film? {
    didSet {
        navigationItem.title = film?.Film_Name
    }
}

var cellId = "cellId"

override func viewDidLoad() {
    super.viewDidLoad()

    tableView.dataSource = self
    tableView.delegate = self
    tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: cellId)

}

override func numberOfSectionsInTableView(tableView: UITableView) -> Int {

    return 1
}

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return 1
}

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

    let cell = tableView.dequeueReusableCellWithIdentifier(cellId, forIndexPath: indexPath) as UITableViewCell

    cell.textLabel?.text = film?.Directed_By
    cell.detailTextLabel?.text = film?.Film_Poster_Image_URL

    return cell

}

}

```

I have tried adding the method to state the `numberOfSections` etc but I don't seem to see them when I build the app. All I see is a normal looking tableview. Am I missing some setup?

Because I am navigating to this VC programmatically, I need to set this up without using the storyboard. 

Any help on how to create the look I need above is appreciated, thanks!