Re: AutoLayout and and views not appearing after segues.

2013-12-10 Thread Fritz Anderson
On 10 Dec 2013, at 1:41 PM, Fritz Anderson  wrote:

> Using the controls at the bottom-right of the Storyboard canvas, set the 
> idiom to iOS 7. Open the Assistant editor and choose Preview. See what 
> happens as you fiddle around with orientation and screen size, again with 
> those controls at bottom-right.

That was sloppily-expressed. The Preview assistant has orientation, size, and 
idiom controls of its own.

— F


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: AutoLayout and and views not appearing after segues.

2013-12-10 Thread Fritz Anderson
On 10 Dec 2013, at 8:58 AM, Alex Zavatone  wrote:

> I've just run across a nasty behaviour where with AutoLayout on iOS 7, 
> sometimes a view will not appear at all after a segue.
> 
> The scary thing is that this is intermittent, and will either happen all the 
> time for a build or never for a build.
> 
> Turning off AutoLayout appears to fix the issue, but I need to test more.
> 
> This is verified under Xcode 5.0.2 and iOS7 on both the simulator and on an 
> iPhone5.
> 
> Has anyone else seen this?

I've seen this when a constraint chain either pushes the view off-screen or 
collapses it to zero on one axis or the other. The conflict might not strike 
every time, because autolayout's response is indeterminate (other than logging 
the problem), and you've mostly been lucky.

If you're developing for iOS 7, you're running Xcode 5.x, and I pray you've set 
the file for the Xcode 5 file type. Using the controls at the bottom-right of 
the Storyboard canvas, set the idiom to iOS 7. Open the Assistant editor and 
choose Preview. See what happens as you fiddle around with orientation and 
screen size, again with those controls at bottom-right. If something 
disappears, select it in the document outline (left side of the canvas, 
expandable with the button at bottom-left), and see what the Size inspector 
says.

If that doesn't help, see what repeating those variations in the iOS (7) 
Simulator does. Some autolayout surprises show up only on a (simulated) device.

But if I'm right, then surely you'd have gotten warnings, both in the console 
at runtime, and in the form of yellow and red badges in the document outline 
next to the controller names. (Click one and get a list of issues; clicking one 
of those will get you a popover offering solutions. And, the scene itself would 
show in yellow the layout each view _ought_ to have if autolayout were fired.

You'd have mentioned this, so all I can say is that in my own experience, this 
the only way I saw what you're seeing.

One approach that helped me was to use the elegantly-named Editor > Resolve 
Auto Layout Issues submenu to clear out all the constraints in the scene, and 
then generate IB's guess at what the constraints ought to be. The result is 
unlikely to be good enough for release (try the orientations, idioms, and sizes 
to see), but at least you'll have a fresh constraint set to work from.

— F


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

AutoLayout and and views not appearing after segues.

2013-12-10 Thread Alex Zavatone
I've just run across a nasty behaviour where with AutoLayout on iOS 7, 
sometimes a view will not appear at all after a segue.

The scary thing is that this is intermittent, and will either happen all the 
time for a build or never for a build.

Turning off AutoLayout appears to fix the issue, but I need to test more.

This is verified under Xcode 5.0.2 and iOS7 on both the simulator and on an 
iPhone5.

Has anyone else seen this?

Sent from my iPad
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com