Load an Image

PDF for offline use:
Sample Code:
Related SDKs:

Let us know how you feel about this.

Thanks for the feedback!

This recipe shows how to load and display an image.


To display an image:

  1. Add the image to your Xamarin.iOS project and ensure the Build Action is set to BundleResource.
  2. Create a UIImageView and add the image using UIImage.FromBundle:
var imageView = new UIImageView (UIImage.FromBundle("MonkeySFO.png"));
imageView.Frame = new CoreGraphics.CGRect (10,10,imageView.Image.CGImage.Width, imageView.Image.CGImage.Height);