Re: view problems

2014-12-20 Thread H Miersch
On 20. Dec 2014, at 22:33, Quincey Morris wrote: > On Dec 20, 2014, at 13:50 , H Miersch wrote: >> >> not sure when layout occurs, but as i say below, that method is called from >> drawrect > > From -[NSView drawRect:]?? You most definitely should not be computing the > view size there, le

Re: view problems

2014-12-20 Thread Quincey Morris
On Dec 20, 2014, at 16:10 , Ken Thomases wrote: > > You've shown the constraints for the size of the subview. There was an exchange in this thread that I just realized wasn’t posted to the list. I *think* this was accidental on the OP’s part, so I’ll copy the messages here, since they are (IMO

Re: view problems

2014-12-20 Thread Ken Thomases
On Dec 20, 2014, at 2:08 PM, H Miersch wrote: > i have a window with a custom view in it. I add another view in code and then > i add a couple of constraints to centre the new view in its superview. so far > so good. > > if i DON'T call [self setTranslatesAutoresizingMaskIntoConstraints:NO]; o

Re: view problems

2014-12-20 Thread Quincey Morris
On Dec 20, 2014, at 13:09 , H Miersch wrote: > > should i add the constraints to the superview instead of self? The height and width constraints should be on the view itself. I’d be more concerned about timing: Did you add constraints before or after layout had occurred, and if after do you n

Re: view problems

2014-12-20 Thread H Miersch
On 20. Dec 2014, at 20:39, Quincey Morris wrote: > On Dec 20, 2014, at 12:08 , H Miersch wrote: >> >> if I DO call [self setTranslatesAutoresizingMaskIntoConstraints:NO]; on the >> subview, the window and its view behave normally, but the subview doesn't >> appear, its drawrect method is no

Re: view problems

2014-12-20 Thread H Miersch
On 20. Dec 2014, at 20:39, Quincey Morris wrote: > On Dec 20, 2014, at 12:08 , H Miersch wrote: >> >> if I DO call [self setTranslatesAutoresizingMaskIntoConstraints:NO]; on the >> subview, the window and its view behave normally, but the subview doesn't >> appear, its drawrect method is no

Re: view problems

2014-12-20 Thread Quincey Morris
On Dec 20, 2014, at 12:08 , H Miersch wrote: > > if I DO call [self setTranslatesAutoresizingMaskIntoConstraints:NO]; on the > subview, the window and its view behave normally, but the subview doesn't > appear, its drawrect method is not called, nothing. > > so what am i doing wrong? It sure