public async void ShowTodaysWallapaper(string imageURL) { byte[] todaysImage = await bingRepo.GetImage(imageURL); UIImage bingImage = new UIImage(NSData.FromArray(todaysImage)); todaysBingWallpaper.Image = bingImage; }
private async void ShowTodaysWallapaper(string imageURL) { byte[] todaysImage = await bingRepo.GetImage(imageURL); File.WriteAllBytes(wallpaperName, todaysImage); if (File.Exists(wallpaperName)) { Console.WriteLine("File created successfully"); } Bitmap bitmap = BitmapFactory.DecodeByteArray(todaysImage, 0, todaysImage.Length); bingImage.SetImageBitmap(bitmap); }