开发者

Using Three20 to show local images

开发者 https://www.devze.com 2023-02-28 07:08 出处:网络
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 succes

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 == .app folder)
  • 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://.

0

精彩评论

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