UIImageView in tableview cell subclass not working as IBOutlet?

This line: cell imageView initWithImage:thumbnail; sounds quite strange. If the imageView has been already initialized, e.g. By the nib, then there is no need to re-initialize again (with undesired results, as init must be called once in the life of an object). Instead if the imageView instance has not been alloc-init yet, then cell imageView will be nil and the initWithImage: call will have no effect at all.

So you say that cell. ImageView is not nil, so your init methodWithImage: method will probably change the frame of the image view and this explains why it has been moved somewhere else than your xib (probably it has been placed in the cell view origin). Don't forget the when an image is loaded from a xib the initWithCoder: method is called instead.

What you can do as a walk around is this code (not tested) which replaces the existing cell with the new cell: CGRect oldFrame = cell.imageView. Frame; UIImageView *newImageView = UIImageView alloc initWithImage:thumbnail autorelease; newImageView. Frame=oldFrame; self.

View addSubview:newImageView; cell. ImageView=newImageView; Of course this solution is not elegant and it would be better if you could fix your KVC issues. The reason of why you get those errors is not clear to me, I should see the code and the xib.

It don't understand what you mean with "doesn't do the trick". There shouldn't be tricks, unless you will be hit by bugs like this.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions