国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > iOS > 正文

IOS初始化控制器的實現方法總結

2019-10-21 18:44:21
字體:
來源:轉載
供稿:網友

IOS初始化控制器的實現方法總結

一.ViewControllViewController方法

#import "AppDelegate.h"#import "ViewController.h"@interface AppDelegate ()@property(nonatomic,strong) ViewController *viewController;@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  //初始化控制器  self.viewController = [[ViewController alloc]init];  //初始化window  self.window =[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];  //設置控制器  self.window.rootViewController = self.viewController;  return YES;}

二 .ViewControllViewController 與 xib方法

#import "AppDelegate.h"#import "XibViewControllViewController.h"@interface AppDelegate ()@property(nonatomic,strong) ViewController *viewController;@property(nonatomic,strong) XibViewControllViewController *xibControllViewController;@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {  //初始化控制器  self.xibControllViewController = [[XibViewControllViewController alloc]initWithNibName:@"XibViewControllViewController" bundle:nil];  //初始化window  self.window =[[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];  //設置控制器  self.window.rootViewController = self.xibControllViewController;  return YES;}

如有疑問請留言或者到本站社區交流討論,感謝閱讀,希望能幫助到大家,謝謝大家對本站的支持!


注:相關教程知識閱讀請移步到IOS開發頻道。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 鹿邑县| 甘谷县| 临汾市| 嘉义县| 南康市| 正宁县| 昌邑市| 云龙县| 临汾市| 霍州市| 宜昌市| 普宁市| 凤台县| 古丈县| 囊谦县| 大厂| 酒泉市| 林周县| 凤冈县| 贵州省| 长治县| 阜新| 通城县| 南京市| 克什克腾旗| 天峻县| 江源县| 通许县| 道真| 响水县| 潢川县| 开鲁县| 砚山县| 息烽县| 永州市| 固始县| 东丰县| 保定市| 黔江区| 交城县| 泸定县|