Using Three20's Photo Viewer, how do I display local开发者_如何学编程 images?
My images are in my app dir and not in my bundle. Setting the URL to file://localhost/<escaped path>gets a successful connection but is not able to download the image because it is expecting a NSHTTPURLResponse.
Three20 use special url schemes for handling in-app resources :
bundle://: app bundle resources (==mainBundle==.appfolder)documents://: user documents
These schemes are defined at a low level in the library, that means you can use from any three20 components, tables, buttons... styles and so on the same way you would use external urls.
I don't normally work with the Three20 framework, but I'll give it a go seeing as there's no other answers yet:
If it's expecting an NSHTTPURLResponse, you're probably supposed to load the images from a server or you utilized a tutorial that dealt with loading images from a server instead of loading them from the local disk. I've also never in my time developing for iOS seen a file in the filesystem pointed to using file://.
加载中,请稍侯......
精彩评论