0
votes

I am new on iphone

what I wanna do is to render image to iphone

so I have one module to generate image data, after done invoke callback function to notify UIView, in UIView I have I have callback function to give the image to UIImage, and then I setNeedsDisplay and return.

In my UIView class drawRect:(CGRect)rect I call drawImage, but it does not called, no refresh, also I got NSAutoreleaseNoPool UIImage autoreleased with no pool in place error.

any helps?

thanks

1

1 Answers

0
votes

you need to create a UIImageView frm your image data then add your new UIImageView to your main view by sending it an addSubView: message. After that your image will automatically be rendered. You do not need to implement drawRect.

It sounds as though you have tried to subclass UIImageView - you should not need to do that unless you have your own internal format for your image data.