views:

246

answers:

1

I have a table view cell of variable height.How can I place an image at the middle (vertically) of the table cell ? Is there any way to set from IB ? or can i do it in codes ?

A: 

Check the documentation on UITableViewCell. You can directly set the image in the following way:

[[myTableViewCell imageView] setImage: myImage];

if you're using iPhone SDK 3.0. If you're writing for 2.0, you need to use:

[myTableViewCell setImage: myImage];

but this is deprecated in 3.0.

Gordon Worley