Skip to content

Instantly share code, notes, and snippets.

View jonedavis's full-sized avatar

Jon Davis jonedavis

  • San Francisco, CA
View GitHub Profile
@jonedavis
jonedavis / AsyncImageDownload
Last active August 29, 2015 14:17
Using ImageDownloader
async void DownloadImage ()
{
UIImage image = null;
await Task.Run (async () => {
image = await new ImageDownloader ()
.GetAsync (new Uri(@"http://xamarin.com/content/images/pages/branding/assets/xamagon.png"));
});
ImageView.Image = image;
@jonedavis
jonedavis / ImageDownloader
Last active August 29, 2015 14:17
Asynchronously download an image in just a few lines of code
using System;
using System.Threading.Tasks;
using System.Net.Http;
using UIKit;
using Foundation;
namespace AsyncImageDownload
{
public class ImageDownloader