我正在寻找显示iOS一般框架的地图。当你创建一个 viewController 时说。创建 ViewController 及其层次结构的确切对象是什么。还有,说你有self,那么super是什么?比如 super 的对象是什么,或者如何描绘超级对象。如果有的话,有人可以分享一下吗?
这是一个例子:http ://cc.cocimg.com/cms/uploads/allimg/120515/4064_120515094512_1.jpg
我正在寻找显示iOS一般框架的地图。当你创建一个 viewController 时说。创建 ViewController 及其层次结构的确切对象是什么。还有,说你有self,那么super是什么?比如 super 的对象是什么,或者如何描绘超级对象。如果有的话,有人可以分享一下吗?
这是一个例子:http ://cc.cocimg.com/cms/uploads/allimg/120515/4064_120515094512_1.jpg
虽然图像详细介绍了直接继承的实际类层次结构;UIViewController 遵循“有”或“知道”的类型设计。这是从 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;
在 Finder/Terminal 中打开此文件夹并返回到父文件夹以获取 SDK 中的更多项目:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/