Re: Problem with Auto Layout and drawRect
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