2015-07-21 11:30:02
- double 變量顯示nan, nan 表示 Not a num,0.0/0.0時會出現這種情況。
2016-03-20 20:29:04
- 私人密鑰加密:使用相同的私密加密和解密。
- 公開密鑰加密:需要發送密文的一方獲得對方的公開密鑰,接收方在收到密文後使用私鑰解密。
- 混合加密:使用公開密鑰加密來發送私人密鑰,之後的傳輸使用私人密鑰加密。
- 數字簽名技術:發送者用自己的私鑰對原文HASH值進行加密,並將原文和HASH值一起發送,接收者用發送者的公鑰解密,並效驗HASH值。此技術用來保證發送者的身份和內容的真實性。
- HTTPS 是在HTTP與TCP層之間加了SSL。
2016-03-21 22:26:46 以下爲iOS相關
- iOS私有API是Apple沒有公開的API, 可以通過class-dump獲取header。
- 使用私有API會導致App store審覈失敗。
- 使用InHouse發佈的App可以不用審覈。
- iOS逆向工程相關:http://www.zhihu.com/question/20317296
- cocoapods 安裝:https://segmentfault.com/a/1190000003742397
- @weakify 與 @strongify http://devshen.github.io/2015/06/04/Why_you_should_start_using@weakify_and%20@strongify_macros/
- prefix.pch 的作用
2016-03-22 22:22:46
- CocoaPods Podfile 語法:https://guides.cocoapods.org/using/the-podfile.html
2016-03-23 23:10:32
- UIView的Spring動畫 ,讓動畫出現反覆的效果:http://www.csdn.net/article/2015-07-03/2825122-ios-uiview-animation-2
- 使用PDF格式的圖片,不再需要區分x1,x2,x3 http://blog.csdn.net/cuibo1123/article/details/39486197/
- 正確移除addObserverForName 的方法 :http://www.jianshu.com/p/1788d15c570b
- 瞭解RAC :http://www.jianshu.com/p/87ef6720a096
2016-03-24 20:09:16
- TabViewCell的重用機制 :
initWithStyle:reuseIdentifier:
創建一個Cell時,框架會將具有相同reuseIdentifier的放入一個隊列。dequeueReusableCellWithIdentifier
會返回一個已經移出屏幕的Cell實例(如果存在的話,不存時返回nil),然後對返回的Cell賦予新的屬性。
2016-03-26 15:20:19
- 通過 Associated Objects 給OC 實例 添加變量:http://blog.leichunfeng.com/blog/2015/06/26/objective-c-associated-objects-implementation-principle/
2016-03-27 08:55:49
- xib 會被編譯後生成nib,xib 的 x代表xml, 它的引入可以更好的適用於版本控制工具。
- ViewController的生命週期:http://blog.csdn.net/busyluo/article/details/50993477
2016-03-28 20:24:10
- UIKit Dynamics 將2D物理引擎引入了人UIKit,實現逼真的物理效果。
- CoreAnimation或者UIView animations的區別。
- 用ModalViewController時,最好在調用present的VC裏設置代理,用於dismiss ModalVC,同時方便數據交互。
- 發送代理消息,作以下檢查:
if (self.delegate && [self.delegate respondsToSelector:@selector(delegateMethod)]) {
[self.delegate delegateMethod];
}
2016-03-29 13:24:59
- ionic、phonegap、react native的區別。http://www.oschina.net/question/576444_2152963?fromerr=i9wlm3y9 https://www.zhihu.com/question/30394458/answer/48267458
- 各種present的區別:http://blog.csdn.net/sunshinexyj/article/details/8476248
- 轉場動畫詳解:http://www.cocoachina.com/ios/20160308/15605.html
2016-03-31 19:21:11
- 誤用UIViewController,https://onevcat.com/2012/02/uiviewcontroller/
避免如下代碼:
viewController.view.bounds = CGRectMake(50, 50, 100, 200);
[viewController.view addSubview:someOtherViewController.view];
2016-04-05 16:51:28 更新:這個結論適用於非Controller容器,對於自定義的Controller容器來說,向當前view上添加其他VC的view是正確的做法(當然不能忘了也將VC本身通過addChildViewController:方法添加到容器中)。
- 打造一個的框架: https://onevcat.com/2016/01/create-framework/
- Library v.s. Framework
- API 設計
- 持續集成,使用工具fastlane
- Xcode 7的單元測試與UI測試使用:http://www.jianshu.com/p/f4ba532caed0
2016-04-02 10:06:32
2016-04-05 21:39:02
- CALayer 和 UIView的區別和聯繫 :http://www.jianshu.com/p/079e5cf0f014
2016-04-06 11:33:26
- 關於旋轉:http://the.ichibod.com/kiji/how-to-handle-device-rotation-for-uiviews-in-ios/
plist設定程序支持的方向,VC裏通過supportedInterfaceOrientations設定自己支持的方向(只有支持的方向能會收到UIDeviceOrientationDidChangeNotification),shouldAutorotate返回是否自動旋轉。
2016-04-09 09:10:56
- EventKit 做日曆和提醒相關的工作:http://www.cnblogs.com/cokecoffe/p/3511530.html
2016-04-14 09:10:08
- 關於旋轉:http://www.molotang.com/articles/1530.html
http://www.jianshu.com/p/d8018006f0b5 - 仿射變換:http://www.cnblogs.com/haore147/p/3618758.html
- Documents:應用中用戶數據可以放在這裏,iTunes備份和恢復的時候會包括此目錄
tmp:存放臨時文件,iTunes不會備份和恢復此目錄,此目錄下文件可能會在應用退出後刪除
Library/Caches:存放緩存文件,iTunes不會備份此目錄,此目錄下文件不會在應用退出刪除
2016-04-29 17:32:13 以下linux編程相關
- RESTful : http://www.ruanyifeng.com/blog/2011/09/restful
- URI 和 URL的區別 :http://www.zhihu.com/question/21950864
- 理解HTTP冪等性 :http://www.cnblogs.com/weidagang2046/archive/2011/06/04/2063696.html
2016-05-01 19:55:35
- autoconf 和 automake http://www.ibm.com/developerworks/cn/linux/l-makefile/
2016-05-03 11:04:25
- x86_64與amd64 :x86 CPU開始邁向64位的時候,intel做的是IA_64,不兼容32位,而AMD則是AMD64,兼容32位。IA_64沒有得到認同,於是intel 也開始支持AMD64,但換名爲x86_64。i686是i386的子集,屬於32位。
2016-05-03 11:04:25
2016-05-17 16:08:35
- 位操作包括三種:<<(左移), >>(算術右移)和>>>(邏輯右移)由於 算數左移和邏輯左移在處理上沒有任何區別,所以只有一種表式。當進行右移操作時,最高位是0,則算術右移與邏輯右移結果相同,即高位加0,比如0x10右移一位即爲0x08。但最高位若是1,則>>結果是高位填1,>>>結果是高位填0。java包括了這三種位移位操作,但是C/C++只提供<<和>>操作,通常當運算對象是signed時當成算數右移處理,但不同的編譯器其行爲有可能不同,所以要測試的。
至於char類型,與int型不同,C規定char跟signed char不是同一種類型,它規定char, signed char和unsigned char是三種
不同類型。char用於表示字符a-z, ‘0’,….,如果把它當number用(因爲C沒有byte類型),它不指定是signed還是unsigned,所以不安全(除非表示的是0-7f之間的數字)。signed char和unsigned char用於表示number,signed char表示-128~127,unsigned char表示0~255。
2016-05-29 23:51:22
- unix編程中,read write 是非緩衝IO, printf是緩衝IO, 遇到\n或緩衝取滿時,或時調用fflush時,纔會輸出。