From 7c083ac48793257ac07510a1709c832d67b9347a Mon Sep 17 00:00:00 2001 From: Matt Senne Date: Mon, 3 Jun 2019 16:09:24 -0400 Subject: [PATCH] Implement iOS stretching fix per https://github.com/triniwiz/nativescript-image-zoom/issues/16#issuecomment-459957691 --- src/image-zoom.ios.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/image-zoom.ios.ts b/src/image-zoom.ios.ts index 66781e5..0ce0222 100644 --- a/src/image-zoom.ios.ts +++ b/src/image-zoom.ios.ts @@ -21,6 +21,7 @@ export class ImageZoom extends ImageZoomBase { public createNativeView() { this._image = UIImageView.new(); this._image.clipsToBounds = true; + this._image.contentMode = UIViewContentMode.ScaleAspectFit; const nativeView = UIScrollView.new(); nativeView.addSubview(this._image); nativeView.zoomScale = this.zoomScale;