IOS swift can I eliminate unused rows in a TableView <p>I am using swift 3.0 and have a TableView in it everything is working great except that I only have 2 rows returning for now but the TableView is showing additional blank rows. I was wondering if there was any way to eliminate those rows for example this is how my simple app looks right now (Below) as you can see I have 2 rows and I want to eliminate the other rows because they do not need to be there . I am new to TableViews and thought that this piece of code controlled how many rows appear</p> <pre><code> func tableView(_ tableView:UITableView, numberOfRowsInSection section:Int) -&gt; Int { return 2 } </code></pre> <p>any suggestions would be great</p> <p><a href="https://i.stack.imgur.com/vFwXY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vFwXY.png" alt="My TableView"></a></p>