Alick Dikan
Alick Dikan

Reputation: 65

table view custom cell trouble

I have a table view. I use a custom cell to view pictures in it. I've set all the delegate and data source methods and made connection to the custom cell. Everything should work fine... But my table view looks like this:

the way my table view looks

It divided the cell into two parts and photo as well. And I've set the height of my custom cell higher than it shows. Can anyone help me? I can provide the code, if needed. thanks in advance.

Upvotes: 0

Views: 212

Answers (1)

aopsfan
aopsfan

Reputation: 2441

Here are a couple suggestions:

  1. Make sure that, when you set the custom cell's height you set it like this: customCell.contentView.frame = ..., not customCell.frame = ....
  2. In the delegate method tableView:heightForRowAtIndexPath:, calculate your cell and set the height as return cell.contentView.frame.

Upvotes: 1

Related Questions