>
>
> Its still an option, especially if you are otherwise using UIViews –
> UIView.maskView would do the trick.
>
Wow - I wasn't even aware that exists. Nice!
Thanks!
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin req
> On Sep 21, 2016, at 11:44 AM, Torsten Curdt wrote:
>
> There isn’t an option to fill width and align top. The more general
> recommendation in this space however would be to use a UIImageView, which has
> all the same options but participates in higher level layout (including the
> content
>
> There isn’t an option to fill width and align top. The more general
> recommendation in this space however would be to use a UIImageView, which
> has all the same options but participates in higher level layout (including
> the content of autoResizingMasks, and also auto layout).
>
I am using
> On Sep 21, 2016, at 11:18 AM, Torsten Curdt wrote:
>
> On iOS I want to fill a layer with an image.
> The width should be filled and the image should retain its aspect ratio.
> This
>
>layer.contents = image.cgImage
>layer.contentsGravity = kCAGravityResizeAspectFill
>
> almo
On iOS I want to fill a layer with an image.
The width should be filled and the image should retain its aspect ratio.
This
layer.contents = image.cgImage
layer.contentsGravity = kCAGravityResizeAspectFill
almost does the right thing - but it positions the image at the centers.
I w