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

首頁 > 系統 > iOS > 正文

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

2020-02-19 15:45:09
字體:
來源:轉載
供稿:網友

IOS開發過程中,常常需要使用顯示表單、數據、圖片、按鈕和其他方法,下面就由武林技術頻道小編介紹的IOS初始化控制器的實現方法總結,一起進入下文學習吧!

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初始化控制器的實現方法總結的話題武林技術頻道小編就說到這里了,希望大家能多多支持我們,專業的技術資訊等你探索。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 扶余县| 许昌县| 剑阁县| 高雄县| 蓬莱市| 灵山县| 苍溪县| 远安县| 伊宁市| 繁昌县| 哈巴河县| 郸城县| 定兴县| 满城县| 深泽县| 平泉县| 林甸县| 六盘水市| 潞城市| 内江市| 宜兰市| 嘉兴市| 武夷山市| 厦门市| 富阳市| 普兰店市| 翁牛特旗| 石狮市| 儋州市| 绥江县| 千阳县| 拉孜县| 同仁县| 黄山市| 景泰县| 阳信县| 白河县| 阿城市| 浙江省| 黑山县| 驻马店市|