Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop

2016-09-23 Thread Torsten Curdt
> > > 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

Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop

2016-09-21 Thread David Duncan
> 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

Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop

2016-09-21 Thread Torsten Curdt
> > 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

Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop

2016-09-21 Thread David Duncan
> 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 =