I'm currently writing a storyboard inspector for helping to create more modular
app pieces in iOS (8)
The idea is if you have enough functionality that is self contained enough, it
should (I hope) be organizationally more efficient to create a storyboard that
handles the desired functionality and can be launched and disposed of as needed.
Naturally, I'm relying on Apple's docs to help me build this and access
UIStoryboard properties, methods and set up my little methods to manage this
process.
So, I look at UIStoryboard.h and the docs and see that there are 3 methods. No
properties.
OK.
That seems sparse.
While building this out and finding out where I screw up with UIStoryboard, I
am using the little category to extend NSObject that dumps all the properties,
property classes and where appropriate, the property values of any object
instance that originates.
And in using it, I find out that in addition to the 3 methods within
UIStoryboard.h, inside a an instance of UIStoryboard, there are a bunch of
properties that appear to be stupidly useful.
Like so:
designatedEntryPointIdentifier
identifierToNibNameMap
storyboardFileName
name
bundle
That seems sparse.
In my case, we have these values which appear in an instance of the
ForgotPassword module I'm creating.
[UIStoryboard {identifierToUINibMap: NSMutableDictionary = (null);
designatedEntryPointIdentifier: NSString = (null);
identifierToNibNameMap: NSDictionary = {
"Forgot Password View Controller" = "Forgot Password View Controller";
"Nav Controller" = "Nav Controller";
"Password Has Been Changed View Controller" = "Password Has Been Changed
View Controller";
};
storyboardFileName: NSString = ForgotPassword.storyboardc;
name: NSString = ForgotPassword;
bundle: NSBundle = NSBundle
</private/var/mobile/Containers/Bundle/Application/F965FA03-0B4C-4BCC-BCAF-F7339A190492/SomeSillyApp.app>
(loaded);
}]
This is really great. I can see if any of my view controllers' scenes'
identifiers are misspelled, I can see what Cocoa's using and verify where or if
I screwed up somewhere.
This is really useful information.
Why isn't it in Apple's documentation for storyboards?
Is it in Apple's documentation for storyboards but I don't know where to look?
If it is, what concept am I missing about understanding Apple's way of
documenting their classes that would help me better understand how to look and
where to look when researching?
I find it really, really odd that the docs go to great extent to try and
present the information they have in an educational and seemingly complete
manner and then find that "oh, we didn't bother to tell you about this stuff
and we're not going to make it easy to find it at all.
See, Apple's docs RARELY say "oh, and you might also want to look here if
you're looking for XXX about YYY".
They give you the impression that "these are complete and that's all the
information you should need to know about the subject. We're giving you all
that you need."
Well, identifierToNibNameMap tells me where/if I screwed up my identifier names
for scenes for my view controllers.
I never would have known about these unlisted (yet accessible and valuable)
properties unless I used a special tool to show what's in each object that
derives from NSObject. That feels really really, um, deceiving (for lack of a
better term).
Am I doing it wrong?
Thanks,
Alex Zavatone
_______________________________________________
Cocoa-dev mailing list ([email protected])
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 [email protected]