tipsywacky
tipsywacky

Reputation: 3464

any roadmap to understand the iOS framework?

I'm looking for a map that shows the general framework of iOS. Say when you create a viewController. What are the exact objects that created the ViewController and its hierarchy. Also, say you have self, then what would be the super? like what would be the object of super or how one would picture the super object. If there's one, can someone share it?

here is an example: http://cc.cocimg.com/cms/uploads/allimg/120515/4064_120515094512_1.jpg

Upvotes: 1

Views: 678

Answers (1)

dans3itz
dans3itz

Reputation: 1615

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIKit_Framework/Introduction/Introduction.html#//apple_ref/doc/uid/TP40006955-CH1-SW1

While the image details the actual class hierarchy in reference to direct inheritance; UIViewController follows the "has a" or "knows about" type design. Here is the top of the interface pulled from UIViewController.h:

UIKIT_CLASS_AVAILABLE(2_0) @interface UIViewController : UIResponder <NSCoding, UIAppearanceContainer> {
    @package
    UIView           *_view;
    UITabBarItem     *_tabBarItem;
    UINavigationItem *_navigationItem;
    NSArray          *_toolbarItems;
    NSString         *_title;

    NSString         *_nibName;
    NSBundle         *_nibBundle;

    UIViewController *_parentViewController; // Nonretained

    UIViewController *_childModalViewController;
    UIViewController *_parentModalViewController; // Nonretained
    UIViewController *_previousRootViewController; // Nonretained    
    UIView           *_modalTransitionView;
    UIResponder      *_modalPreservedFirstResponder;
    UIResponder      *_defaultFirstResponder;
    UIDimmingView    *_dimmingView;
    UIDropShadowView *_dropShadowView;

    id                _currentAction;
    UIStoryboard     *_storyboard;
    NSArray          *_storyboardSegueTemplates;
    NSDictionary     *_externalObjectsTableForViewLoading;

    UIView           *_savedHeaderSuperview;
    UIView           *_savedFooterSuperview;

    UIBarButtonItem  *_editButtonItem;

    UISearchDisplayController *_searchDisplayController;

    UIModalTransitionStyle _modalTransitionStyle;
    UIModalPresentationStyle _modalPresentationStyle;

    UIInterfaceOrientation _lastKnownInterfaceOrientation;

    UIPopoverController*    _popoverController;
    UIView *_containerViewInSheet;
    CGSize _contentSizeForViewInPopover;
    CGSize _formSheetSize;

Bring up this folder in Finder/Terminal and back off to the parent folder for more items in the SDK:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/

Upvotes: 1

Related Questions