Re: Starting out with storyboards (on Mac)
Re: Starting out with storyboards (on Mac)
- Subject: Re: Starting out with storyboards (on Mac)
- From: Alex Zavatone <email@hidden>
- Date: Tue, 01 Mar 2016 10:57:50 -0500
On Mar 1, 2016, at 10:40 AM, Charles Jenkins wrote:
> Thank you for that, Jerry. I started to reply in a similar way this morning, but deleted my draft because I thought I might just be making unhelpful noise.
>
> I am in Storyboards 101 right along with Daryle, and as I typed in example code from a tutorial project, my fumbling around with autolayout constraints confused XCode and caused it to lock up and crash—but not before saving my main storyboard file. After that, XCode beachballed for a long time and then crashed every time I attempted opening that file, so I lost access to all the screens in the storyboard at once.
>
> I’m sure I could have looked into ways to manually edit the file to remove the deadly constraints, but my point it, I hear there’s a way to break up storyboards and add segue references between them. So my advice would be similar:
There is.
If you delete the top level view of a storyboard's scene, the view controller will by default try to load an XIB that is the same name as the view controller's class and will replace that missing.
If you doubt me (as you well should), read the header file for NSViewController and UIViewController.
In NSViewController, the relevant docs start at like 63. In UIViewController, the docs start at line 101.
It actually works like this by default.
What this enables you to do is use the storyboard as a skeleton with navigation information to and from each screen and then edit each screen's XIB individually.
If you crater one screen, then you crater one screen, not the whole storyboard.
I can send you an iOS demo app that shows this, if you'd like. I call them Linked XIBs.
For one thing, when you're editing the XIB, you don't have to worry about all the other views controllers that you currently don't care about. For me it's easier to focus on the task at hand and greatly simplifies the storyboard and minimizes the storyboard's demand for valuable screen real estate.
Cheers.
Alex Zavatone
>
> Storyboards are option. Feel free to stick with XIBs.
> If you do use storyboards, consider breaking your UI up among several, so if a problem develops in one file, it won’t cost you all the work you’ve done on the UI.
>
> --
>
> Charles
>
> On March 1, 2016 at 10:22:36, Jerry Krinock (email@hidden) wrote:
>
>
>> On 2016 Mar 01, at 01:33, Daryle Walker <email@hidden> wrote:
>>
>> Tried out Mac programming … turned on … storyboards.
>
> If:
>
> • Your primary experience is in OS X>
> • You know nibs.
> • Your purpose is to ship OS X apps, not broaden your horizons.
>
> Is there any reason to learn and use storyboards?
>
>
> _______________________________________________
>
> 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
> _______________________________________________
>
> 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
_______________________________________________
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