iOS 中 UIApplication基本用法

2021-07-08 11:22:53 字數 1041 閱讀 9607

這裡ios設定一行**就可以搞定了

從ios7開始,系統提供了2種管理狀態列的⽅方式

每乙個uiviewcontroller都可以擁有自己不同的狀態列

每乙個應用程式的狀態列都由它統一管理 

在ios7中,預設情況下,狀態列都是由uiviewcontroller管理 的,uiviewcontroller實現下列方法就可以輕鬆管理狀態列的可見性和樣式 

狀態列的樣式

(uistatusbarstyle)preferredstatusbarstyle;
狀態列的可⻅見性

➢ 打**

nsurl

urlwithstring:@

"tel://10086"

]];➢ 發簡訊

nsurl

urlwithstring:@

"sms://10086"

]];

➢ 發郵件

nsurl

urlwithstring:@

"mailto:"

]];

➢ 開啟⼀乙個網頁資源

nsurl

urlwithstring:@

""]];

IOS中UIViewController的建立

self.window uiwindow alloc initwithframe uiscreen mainscreen bounds self.window.backgroundcolor uicolor whitecolor self.window makekeyandvisible retur...

IOS開發中如何區分IOS版本

當前系統支援的最小版本 iphone os version min required 當前系統支援的最大版本 iphone os version max allowed 比如用iphone os sdk 3.1.2 編譯的程式 iphone os version min required iphon...

ios中讀寫檔案

在ios的開發中,經常遇到要讀寫檔案的情況,例如處理 採集資訊等,那麼在ios中對檔案的讀寫有兩種方式 1 使用nsdata 來將整個資料讀取到記憶體中 將檔案寫到檔案中 使用這種方式比較適合針對小檔案的讀寫,可以全部的讀到記憶體中處理,比如說全域性性的配置檔案等。2 使用c的api來讀取 在ios...