开发者

UIImage or CGImage is preferred?

I have a UIView with UIImageView as its subview and i need to change the image in that view while the user开发者_开发百科 swipe it.

I tried it using UIImage, but the app crashes and the memory keeps on rising.

When I tried some googling I got to know that CGImage might be a good choice. Can someone direct me to the right track.

Thanks


UIImageView works with UIImages. CGImage is a representation of more low-level image data.

You want to keep using UIImage and concentrate on fixing your bugs. Apparently you are not properly handling memory - retaining and releasing images. Use debugger to fix the crash, Instruments to figure out why memory consumption goes up. I answered another question with information how it can be solved: UITextView delegates problem


Try loading UIImage to UIImageView by tiling

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜