藍寶石公主號-Day1 基隆港出航&船上第一晚
遲來的母親節禮物終於正式要上演了,站長人老了現在都不多話,就直接用照片記錄行程吧
…
設置邊框樣式,只有設置了才會顯示邊框樣式
text.borderStyle = UITextBorderStyleRoundedRect;
[c]typedef enum {
UITextBorderStyleNone,
UITextBorderStyleLine,
UITextBorderStyleBezel,
UITextBorderStyleRoundedRect
} UITextBorderStyle;[/c]
…
[c]dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// 耗时的操作
dispatch_async(dispatch_get_main_queue(), ^{
// 更新界面
});
}); [/c]
…
但很多時候你就會去做那些你不該做的事。比方說,你要寫一個 iOS 上的 Client,而 API Server 也還在開發中,接下來所有的 API 都會使用 HTTPS,但是還沒有花錢去買憑證,所以就先隨便產生了一個東西檔著先,而如果你使用 NSURLSession 試圖建立不安全的 HTTPS 連線的話,NSURLSession 就拒絕連線並且回傳 Error 物件。但是這種狀況下,你還是要先想辦法把連線建立起來,才有辦法在 Server 還在開發中的狀況下也寫點 Client Side 的程式。
…
身為iOS的開發人員很常會遇到iOS升級,Xcode也要跟著升級才能繼續開發
但很奇怪的是iOS每次升級,舊的APP就一定有問題,寫法都會有不相容新的SDK
勢必就要一一的去修正(真不懂為什麼Android就不用這麼麻煩)
有時候APP很趕著要上架,沒空一一修正和改寫不相容的錯誤
這時一個舊版的Xcode就很重要了,以下就教你如何安裝新舊兩套版本的Xcode
…
** If you have an existing class that you’d like to use, perform Step 2 and then skip to Step 5. (For some cases, I had to add an explicit #import <Foundation/Foundation.h to an older ObjC File) **
Add a .m file to your class, and name it CustomObject.m
When adding your .m file, you’ll likely be hit with a prompt that looks like this:

Click YES !
If you did not see the prompt, or accidentally deleted your bridging header, add a new .h file to your project and name it <#YourProjectName#>-Bridging-Header.h
…