Re: Auto-Layout Strangeness

2014-07-31 Thread Dave
Hi, But why would it work ok with auto layout on? And also, why is only the first subview affected? If someone is messing around with CALayer or whatever, then I don’t think it’s in my App, but in Cocoa-Touch and out of my control. To recap: If auto layout is on, the first subview of a View l

Re: Auto-Layout Strangeness

2014-07-31 Thread Uli Kusterer
On 30 Jul 2014, at 19:18, Dave wrote: > The problem is that the drawRect method in “FrameRect” does not get called > and it’s background colour doesn’t get set either. When I first created this > view, I had Auto-Layout enabled and in this case the background colour is set > ok and the drawRect

Re: Auto-Layout Strangeness

2014-07-31 Thread Dave
On 31 Jul 2014, at 00:28, Graham Cox wrote: > > On 31 Jul 2014, at 6:57 am, Dave wrote: > >> (void) drawRect:(CGRect) theRect >> { > > >> myRect = CGRectInset(theRect,0,0); > > > is the DIRTY rect of the view, not its bounds, so myRect is derived > from it. Framing and filling that isn'

Re: Auto-Layout Strangeness

2014-07-30 Thread Graham Cox
On 31 Jul 2014, at 6:57 am, Dave wrote: > (void) drawRect:(CGRect) theRect > { > myRect = CGRectInset(theRect,0,0); is the DIRTY rect of the view, not its bounds, so myRect is derived from it. Framing and filling that isn't doing what you think it is - it's probably empty at first for exa

Re: Auto-Layout Strangeness

2014-07-30 Thread Dave
Hi, > But your mentioning of background color is kind of strange, since that should > be set regardless of -drawRect: being called – or are you doing things > unrelated to drawing inside of -drawRect:? No, here is the method.: -(void) drawRect:(CGRect) theRect { CGRect

Re: Auto-Layout Strangeness

2014-07-30 Thread David Duncan
> On Jul 30, 2014, at 10:18 AM, Dave wrote: > > XCode 5, Mac OS 10.9.4, iOS 7. > > Hi, > > I'm working on a project that uses a lot of view “cells” that go into Scroll > and Table Views. Each “cell” View is in separate .xib file and is loaded > something like this: > > +(instancetype) newVi

Auto-Layout Strangeness

2014-07-30 Thread Dave
Hi Again, I tried a few things to fix this, but the only thing that makes drawRect etc. trigger on the First Subview of a View Loaded manually from a NIB with Auto Layout disabled, is to add a Dummy View as the fist subview and then put all the other views inside this one. When I do this, the B

Auto-Layout Strangeness

2014-07-30 Thread Dave
XCode 5, Mac OS 10.9.4, iOS 7. Hi, I'm working on a project that uses a lot of view “cells” that go into Scroll and Table Views. Each “cell” View is in separate .xib file and is loaded something like this: +(instancetype) newViewOfKind:(NSString*) theViewKind withItemInfo:(LTWItemInfo*) theIt