Re: Width defining NSLayoutConstraint zero

2014-04-10 Thread Kyle Sluder
On Thu, Apr 10, 2014, at 11:37 AM, Jonathan Mitchell wrote: > > On 10 Apr 2014, at 17:09, Kyle Sluder wrote: > > > On Apr 10, 2014, at 6:25 AM, Jonathan Mitchell wrote: > >> > >> On some occasions I want my controls to collapse and set a width defining > >> constraint constant to zero. > > >

Re: Width defining NSLayoutConstraint zero

2014-04-10 Thread Jonathan Mitchell
On 10 Apr 2014, at 17:09, Kyle Sluder wrote: > On Apr 10, 2014, at 6:25 AM, Jonathan Mitchell wrote: >> >> On some occasions I want my controls to collapse and set a width defining >> constraint constant to zero. > > In general, views should not be resized to zero width or height. A lot of

Re: Width defining NSLayoutConstraint zero

2014-04-10 Thread Jonathan Mitchell
On 10 Apr 2014, at 17:09, Kyle Sluder wrote: >> >> Is the only workaround to wrap such controls in another view and collapse >> the superview instead? > > If you want to remove a view, you should really remove it from its superview. > You could look into NSStackView, which will do this autom

Re: Width defining NSLayoutConstraint zero

2014-04-10 Thread Kyle Sluder
On Apr 10, 2014, at 6:25 AM, Jonathan Mitchell wrote: > > On some occasions I want my controls to collapse and set a width defining > constraint constant to zero. In general, views should not be resized to zero width or height. A lot of times things will break internally (divide by zero errors

Width defining NSLayoutConstraint zero

2014-04-10 Thread Jonathan Mitchell
On some occasions I want my controls to collapse and set a width defining constraint constant to zero. In some cases, say a checkbox, an onscreen artefact remains. I presume that this is because the constraint is defining the layout rather than the frame rectangle. Is the only workaround to wra