Asynchronous image loading on the iPhone NSURLConnection or NSThread and NSData dataWithContentsOfURL
In order to load images asyncornisly on the iPhone you must choose to use NSURLConnection or NSData dataWithContentsOfURL along with NSThread. I have decided to use threads to do my asynchronous image loading in spite of the following and rather hilarious warning from the Apple Threading Programming Guide.
"If you do not fully understand the implications of your design choices, you might encounter synchronization or timing issues, the severity of which can range from subtle behavioral changes to your application imploding gloriously and destroying user data. (Granted, it takes a lot of effort for you to cause your application to implode gloriously, but the fact that it is possible should serve as a warning not to skimp on your planning efforts.)"
When I am done, I shall publish my asynchronous web image loader in hopes that it may be helpful.
"If you do not fully understand the implications of your design choices, you might encounter synchronization or timing issues, the severity of which can range from subtle behavioral changes to your application imploding gloriously and destroying user data. (Granted, it takes a lot of effort for you to cause your application to implode gloriously, but the fact that it is possible should serve as a warning not to skimp on your planning efforts.)"
When I am done, I shall publish my asynchronous web image loader in hopes that it may be helpful.


0 Comments:
Post a Comment
<< Home