Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Fabien Molinet edited this pageMay 7, 2016 ·12 revisions

Source

On iOS images can be loaded from Internet or File.

Internet

When the image is loaded from internet the image is cached on disk (by default 30 days but there is an optional TimeSpan so you can choose yours).

ImageService.Instance.LoadUrl(urlToImage).Into(_imageView);

On iOS9 you will need to configure ATS (App Transport Security) to load from non HTTPS websites: by default ATS prevents requests to non HTTPS website. This is easily configurable:http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/

File

when you want to load the image from a file or application bundle:

ImageService.Instance.LoadFile(fullPathToImage).Into(_imageView);

Remark: on iOS bothImageService.Instance.LoadFileFromApplicationBundle andImageService.Instance.CompiledResource have the same effect asImageService.Instance.LoadFile.

Stream

The image can be loaded from an existing Stream. Pleas note: In this case the image is only cached in memory when custom key is provided. Please note that the Stream is automatically closed.

ImageService.Instance.LoadStream((token)=>{returnSomeMethodWhichReturnsStream(token);}).Into(_imageView);

WebP image format

WebP is supported on iOS usingWebP.Touch (included as a Nuget dependency). WebP.Touch is a wrapper around official WebP lib from Google.Requested URL or requested file must end with .webp to be correctly decoded.

nice

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp