views:

222

answers:

1

What else is needed to display image to full tableview width?

UIImage *image = [UIImage imageNamed:@"balloon_2.png"]; 
[image stretchableImageWithLeftCapWidth:15 topCapHeight:13]; 
cell.image = image;
A: 

stretchableImageWithLeftCapWidth:topCapHeight: returns a new UIImage. You need to do something like

UIImage *image = [UIImage imageNamed:@"balloon_2.png"]; 
UIImage *strImage = [image stretchableImageWithLeftCapWidth:15 topCapHeight:13]; 
cell.image = strImage;

... or just assign the result of the message to cell.image right away.

See also: UIImage reference

VoidPointer
Changed this and now get exception when running:'NSInvalidArgumentException', reason: '*** -[UICGColor stretchableImageWithLeftCapWidth:topCapHeight:]: unrecognized selector sent to instance 0x529900'Arguments don't seem wrong though?
MartinW