Example #1
0
 /// <summary>
 ///   Requests an image to be loaded using the default image loader
 /// </summary>
 /// <param name="uri">
 /// The URI for the image to load
 /// </param>
 /// <param name="notify">
 /// A class implementing the IImageUpdated interface that will be invoked when the image has been loaded
 /// </param>
 /// <returns>
 /// If the image has already been downloaded, or is in the cache, this will return the image as a UIImage.
 /// </returns>
 public static UIImage DefaultRequestImage(string uri, IImageUpdated notify, Action <HttpWebRequest> webRequestInit = null)
 {
     if (DefaultLoader == null)
     {
         DefaultLoader = new ImageDownloader(50, 4 * 1024 * 1024);
     }
     return(DefaultLoader.RequestImage(uri, notify, webRequestInit));
 }
Example #2
0
        public UIImage RequestImageOrEmpty(string imageUrl, Action <NSIndexPath> callback)
        {
            if (string.IsNullOrEmpty(imageUrl))
            {
                return(UIImage.FromFile(NoImagePath));
            }

            return(ImageDownloader.DefaultRequestImage(imageUrl, new ImageUpdater(callback), ImageWebRequestInit));
        }
Example #3
0
 /// <summary>
 ///   Requests an image to be loaded using the default image loader
 /// </summary>
 /// <param name="uri">
 /// The URI for the image to load
 /// </param>
 /// <param name="notify">
 /// A class implementing the IImageUpdated interface that will be invoked when the image has been loaded
 /// </param>
 /// <returns>
 /// If the image has already been downloaded, or is in the cache, this will return the image as a UIImage.
 /// </returns>
 public static UIImage DefaultRequestImage(string uri, IImageUpdated notify, Action<HttpWebRequest> webRequestInit = null)
 {
     if (DefaultLoader == null)
         DefaultLoader = new ImageDownloader (50, 4*1024*1024);
     return DefaultLoader.RequestImage (uri, notify, webRequestInit);
 }
Example #4
0
 public UIImage RequestImage(string imageUrl, NSIndexPath indexPath, Action <NSIndexPath> callback)
 {
     return(ImageDownloader.DefaultRequestImage(imageUrl, new ImageUpdater(callback, indexPath), ImageWebRequestInit));
 }