public override void ViewDidLoad() { base.ViewDidLoad(); HNKCacheFormat format = (HNKCacheFormat)HNKCache.SharedCache().Formats["thumbnail"]; if (format == null) { format = new HNKCacheFormat("thumbnail") { Size = new SizeF(320, 240), ScaleMode = HNKScaleMode.AspectFill, CompressionQuality = 0.5f, DiskCapacity = 1 * 1024 * 1024, PreloadPolicy = HNKPreloadPolicy.LastSession }; } TheImageView.SetCacheFormat(format); TheButton.SetBackgroundImage(new NSUrl("https://raw.githubusercontent.com/Haneke/Haneke/master/Assets/github-header.png"), UIControlState.Normal); TheImageView.SetImage(new NSUrl("https://raw.githubusercontent.com/Haneke/Haneke/master/Assets/github-header.png")); }
public override void ViewDidLoad() { base.ViewDidLoad(); var cache = HNKCache.SharedCache(); HNKCacheFormat format = (HNKCacheFormat)cache.Formats["thumbnail"]; if (format == null) { format = new HNKCacheFormat("thumbnail") { Size = new SizeF(320, 240), ScaleMode = HNKScaleMode.AspectFill, CompressionQuality = 0.5f, DiskCapacity = 1 * 1024 * 1024, PreloadPolicy = HNKPreloadPolicy.LastSession }; } HanekeImageView.SetCacheFormat(format); HanekeImageView.SetImage(new NSUrl("http://images.kpopstarz.com/data/images/full/190451/katy-perry-sex-bomb.png?w=300"), UIImage.FromBundle("41015.png")); HanekeButton.SetBackgroundImage(new NSUrl("http://images.kpopstarz.com/data/images/full/190451/katy-perry-sex-bomb.png?w=300"), UIControlState.Normal, UIImage.FromBundle("41015.png")); }