I’m currently trying to create a subclass of UIImageView in order to make it download its image from server asynchronously 😉
I tried to do it by myself but I haven’t gone very far yet 😀
Anyway, I looked around here and found this :
I had a look at the code and the first which springs to mind is : why subclassing a UIView and not a UIImageView ?!?
Any thoughts ?
Cheers mates,
Gotye.
The reason it is subclassing UIView is so that you should, for example, display a UIActivityIndicator while the image is being downloaded. They do not show this in their example but I have used this code and it is really good. Also look at the comments for this post you will find more code examples, also including some caching and nice stuff.
Take a look at Wayne Cochra’s comment. His YellowJacket.zip code is very nice.