Mehmet Davut
Mehmet Davut

Reputation: 667

Can't set properly TableViewCell's Row Height

I am trying to complete a tutorial about iOS8 SDK Development. When i try to create a custom cell, I am getting a result like that with cell's height:

I have a table view like that: TableView

I setted Row Height for this cell:

Row Height

But i am getting result like that: Result

Upvotes: 1

Views: 39

Answers (2)

Jim Tierney
Jim Tierney

Reputation: 4105

On your storyboard, select the UITableView and open the attributes panel and set the Row Height here too.

enter image description here

Setting the TableCell height only doesn't change the height as the compiler will also take height data from the UITableView, hence change it here too.

Upvotes: 1

iamIcarus
iamIcarus

Reputation: 1438

Check if you have implemented the delegate method heightForRowAtIndexPath since it mutual exclusive with the value u set on the designer

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
 {
     return height;
}

Upvotes: 0

Related Questions