• 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: Problem with Auto Layout and drawRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Auto Layout and drawRect


  • Subject: Re: Problem with Auto Layout and drawRect
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 07 Sep 2015 18:23:25 +0000

On Sep 7, 2015, at 10:34 , Dave <email@hidden> wrote:
>
> I’ve pasted the class below, can anyone see anything wrong with it in terms of not working in a Scroll/Stack View and auto layout?

Well, your drawRect method looks pretty fundamentally broken. The parameter (‘theRect’ in your case) is the portion of the view that’s dirty and needs to be redrawn. It’s in effect a random piece of your view, not the whole view or the whole of anything.

So, insetting it and filling it, or framing it, is the wrong thing to do. If it “worked' previously, that’s because you were lucky enough to always get whole-view dirty rects.



_______________________________________________

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: 
 >Problem with Auto Layout and drawRect (From: Dave <email@hidden>)

  • Prev by Date: Re: Problem with Auto Layout and drawRect
  • Next by Date: Re: Problem with Auto Layout and drawRect
  • Previous by thread: Re: Problem with Auto Layout and drawRect
  • Next by thread: Re: Problem with Auto Layout and drawRect
  • Index(es):
    • Date
    • Thread