LearnHouse

[轉]How to call Objective C code from Swift or Swift code from Objective C

Using Objective-C Classes in Swift

** 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) **

Step 1: Add Objective-C Implementation -- .m

Add a .m file to your class, and name it CustomObject.m

Step 2: Add Bridging Header

When adding your .m file, you'll likely be hit with a prompt that looks like this:

enter image description here

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

Read more...

posted by admin in 程式&軟體 and have No Comments

[轉]iOS的沙盒機制(SandBox)

轉貼來源:

http://www.superqq.com/blog/2015/07/20/ioskai-fa-zhi-sha-he-ji-zhi-%28sandbox/
http://www.superqq.com/blog/2015/07/22/ioskai-fa-zhi-huo-qu-sha-he-lu-jing

iOS APP可以在自己的沙盒裡讀寫文件,但是,不可以訪問其他APP的沙盒。每一個APP都是一個信息孤島,相互是不可以進行通信的,唯獨可以通過URL Scheme。沙盒裡面的文件可以是照片、聲音文件、文本、屬性列表等。

Read more...

posted by admin in 程式&軟體 and have No Comments

Don't reboot it just patch

心有戚戚焉?

Read more...

posted by admin in 影視娛樂 and have No Comments

清除XCode暫存避免MAC空間不足

DerivedData
影響:會刪除build生成的專案索引、build輸出以及日誌。重新打開項目時會重新生成,大的專案會耗費一些時間。
路徑:~/Library/Developer/Xcode/DerivedData

移除模擬器的臨時文件
影響:如果需要保留較新版本的模擬器,但tmp文件夾很大。放心刪吧,tmp文件夾裡的內容是不重要的。在iOS Device中,存儲空間不足時,tmp文件夾是可能被清空的。
路徑:~/Library/Application Support/iPhone Simulator/8.0/tmp

移除對舊設備的支持
影響:再連接舊設備調試時,會重新自動生成。
路徑:~/Library/Developer/Xcode/iOS DeviceSupport
Read more...

posted by admin in 程式&軟體 and have No Comments

How to create an iOS distribution certificate, provisioning profile and ANPS certificate

http://www.folio3.com/blog/how-to-create-an-ios-distribution-certificate-provisioning-profile-and-apns-certificate/

posted by admin in 程式&軟體 and have No Comments

[轉]從 NSURLConnection 到 NSURLSession

轉貼位址:http://objccn.io/issue-5-4/

iOS 7 和 Mac OS X 10.9 Mavericks 中一個顯著的變化就是對 Foundation URL 加載系統的徹底重構。

現在已經有人在深入蘋果的網絡層基礎架構的地方做研究了,所以我想是時候來分享一些對於我對於這些新的 API 的看法和心得了,新的 API 將如何影響我們編寫程序,以及它們對於 API 設計理念的影響。

Read more...

posted by admin in 參考文獻 and have No Comments

馬祖半馬路跑-第一屆馬祖國際馬拉松-Day3

終於到這一天了,有點罪惡。沒練就算了還每個禮拜都吃很好

Read more...

posted by admin in 生活日記 and have No Comments

馬祖半馬路跑-北竿/南竿一日遊-Day2

第二天是北竿一日遊,從南竿到北竿船程只要20分,但要價160,似乎有點黑

Read more...

posted by admin in 生活日記 and have No Comments

馬祖半馬路跑-大漢據點、北海坑道-Day1

時間過好快馬上就到要跑半馬了,一路這麼遠到馬祖,當然要安排一下輕旅行

Read more...

posted by admin in 生活日記 and have No Comments

香港自由行-星巴克、添好運、東薈城Outlet-Day3

今天是第三天的行程,也是最後一天了

旺角洗衣街有一間很充滿復古港味的星巴克,當然要去參觀一下並買紀念隨行杯

Read more...

posted by admin in 生活日記 and have No Comments