框架

SDWebImage 加載圖片

Reachability 監測聯網狀態

SSKeyChain 鑰匙串

SSZipArchive 壓縮、解壓縮zip、unzip ?//如出錯,需要加載解壓縮依賴的動態庫libz.dylib或libz最新版本

AFNetworking 網絡

OBShapedButton 判斷按鈕部分是否透明


__weak typeof(self) weakSelf = self;


iOS、OS X 都支持CoreGraphics, QuartzCore。

UIKit只支持iOS。

CALayer在QuartsCore框架中

CGImageRef、CGColorRef在CoreGraphics

UIImage、UIColor在UIKit。


1. ceil() 向上取整

//Test ceil() 向上取整

cout << "Test ceil() 向上取整!" << endl;

cout << "ceil 1.2 = " << ceil(1.2) << endl;? ? ? //2

cout << "ceil 1.8 = " << ceil(1.8) << endl;? ? ? //2

cout << "ceil -1.2 = " << ceil(-1.2) << endl;? ? //-1

cout << "ceil -1.8 = " << ceil(-1.8) << endl;? ? //-1

cout << "ceil 0.0 = " << ceil(0.0) << endl;? ? ? //0

cout << endl;

2. floor() 向下取整

//Test floor() 向下取整

cout << "Test floor() 向下取整!" << endl;

cout << "floor 1.2 = " << floor(1.2) << endl;? ? //1

cout << "floor 1.8 = " << floor(1.8) << endl;? ? //1

cout << "floor -1.2 = " << floor(-1.2) << endl; //-2

cout << "floor -1.8 = " << floor(-1.8) << endl; //-2

cout << "floor 0.0 = " << floor(0.0) << endl;? ? //0

cout << endl;


update update

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容