2016年4月26日 星期二

iOS筆記:This application is modifying the autolayout engine from a background thread...

全Log:This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes.  This will cause an exception in a future release.

原意:你在非主線程動到了UI,可能會造成崩潰。
只要有UI前綴的,包含AlertView類跳窗,更改任何參數都要在主線程

dispatch_async(dispatch_get_main_queue(), ^{
    [self updateUI];
});

2016年4月18日 星期一

iOS筆記:在xcode用data struct遇到的error

載別人code來用時都發現它們的寫法在Xcode7用不了。

創建變數時形態前方要加上struct前綴

即為
myStruct dataA ; //ERROR
struct myStruct dataA ; //OK

轉型態也是
struct myStruct *dataB = (struct myStruct *) dataA;

2016年3月15日 星期二

iOS筆記:使用TestFlight進行內部測試

TestFlight有分內部跟外部,內部提供給開發者跟其成員使用,限制25人。外部則是開放外人測試的,限制2000人,且必須經過審核。

參考:
iTunes Connect 開發人員指南
如何使用TestFlight进行App构建版本测试


2016年3月14日 星期一

2016年3月9日 星期三

iOS筆記:iOS9後與HTTP

Apple在iOS9之後強迫預設使用HTTPS才能建立連線,若是沒使用HTTPS,建立連線會發現⋯⋯送出去的請求一去不回來了,什麼反應也沒有

keyword: Ajax not working,  NSURLSession not working ...