我正在尋找一張顯示iOS一般框架的地圖。說你什麼時候創建一個viewController。創建ViewController及其層次結構的確切對象是什麼?另外,說你有自我,那麼超級會是什麼?比如超級對象是什麼,或者人們如何描繪超級對象。如果有的話,有人可以分享嗎?任何路線圖瞭解iOS框架?
這裏是一個例子:http://cc.cocimg.com/cms/uploads/allimg/120515/4064_120515094512_1.jpg
我正在尋找一張顯示iOS一般框架的地圖。說你什麼時候創建一個viewController。創建ViewController及其層次結構的確切對象是什麼?另外,說你有自我,那麼超級會是什麼?比如超級對象是什麼,或者人們如何描繪超級對象。如果有的話,有人可以分享嗎?任何路線圖瞭解iOS框架?
這裏是一個例子: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;
調出查找器/終端這個文件夾和後退到父文件夾的多個項目在SDK:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/UIKit.framework/Headers/
嗯,在我看來,只有公共sdk顯示(NSObject,UIResponder)的ViewController。但是,如果你確實去查看ViewController的源代碼,你可以檢查哪些代碼被使用了,對吧? – Panagiotis