• 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 disappears on view resize...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer disappears on view resize...


  • Subject: Re: CALayer disappears on view resize...
  • From: "Peters, Brandon" <email@hidden>
  • Date: Thu, 28 Aug 2014 02:46:52 +0000
  • Thread-topic: CALayer disappears on view resize...

Never mind, I missed a call to super. I will look into the guide in more detail. Thank you.

On Aug 27, 2014, at 10:43 PM, Brandon Peters <email@hidden> wrote:

> Kyle,
>
> I noticed the guide mentioned overriding setFrameSize. In a test run I noticed that overriding this method did away with the view size constraints I setup in IB. Is that expected behavior for overriding such method?
>
> On Aug 27, 2014, at 9:56 PM, Kyle Sluder <email@hidden> wrote:
>
>> On Wed, Aug 27, 2014, at 08:17 PM, Peters, Brandon wrote:
>>> Devs,
>>>
>>> I have a NSScrollview with and NSImageView as its document view. I have a
>>> sublayer for the scrollview that serves my selection rect. When I load an
>>> image I can pressed down and draw the selection rect, but as soon as I
>>> resize the window, the rect disappears but the image remains. As the
>>> window resizes, the code changes the location of the image in the window
>>> and should also be updating the location of the selection rect such that
>>> the selection rect “stays in place” with respect to the image as its
>>> location is updated due to the window resize. Here is what I have in
>>> drawRect():
>>
>> Stop. -drawRect: is for drawing, not for resizing things.
>>
>> Start by reviewing the View Programming Guide:
>> https://developer.apple.com/library/mac/documentation/cocoa/Conceptual/CocoaViewsGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40002978
>>
>> --Kyle Sluder
>>
>> _______________________________________________
>>
>> 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
>


_______________________________________________

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


References: 
 >CALayer disappears on view resize... (From: "Peters, Brandon" <email@hidden>)
 >Re: CALayer disappears on view resize... (From: Kyle Sluder <email@hidden>)
 >Re: CALayer disappears on view resize... (From: "Peters, Brandon" <email@hidden>)

  • Prev by Date: Re: CALayer disappears on view resize...
  • Next by Date: Printing onto custom paper (filling in forms)
  • Previous by thread: Re: CALayer disappears on view resize...
  • Next by thread: Printing onto custom paper (filling in forms)
  • Index(es):
    • Date
    • Thread