• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop


  • Subject: Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop
  • From: Torsten Curdt <email@hidden>
  • Date: Wed, 21 Sep 2016 20:44:03 +0200

>
> 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 the layer as a mask - so the UIImageView isn't really an option.
BUT I just found that adjusting the contentsRect to the right ratio does
the trick.

cheers,
Torsten
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop
      • From: David Duncan <email@hidden>
References: 
 >CALayer kCAGravityResizeAspectFill and kCAGravityTop (From: Torsten Curdt <email@hidden>)
 >Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop (From: David Duncan <email@hidden>)

  • Prev by Date: Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop
  • Next by Date: Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop
  • Previous by thread: Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop
  • Next by thread: Re: CALayer kCAGravityResizeAspectFill and kCAGravityTop
  • Index(es):
    • Date
    • Thread