韌館-LearnHouse

簡單魔術教學

一分鐘出4A

Read more...

2016年10 月 posted by admin in 趣味一下 and have No Comments

[轉]在使用 NSURLSession 時允許使用不安全的 SSL 連線

但很多時候你就會去做那些你不該做的事。比方說,你要寫一個 iOS 上的 Client,而 API Server 也還在開發中,接下來所有的 API 都會使用 HTTPS,但是還沒有花錢去買憑證,所以就先隨便產生了一個東西檔著先,而如果你使用 NSURLSession 試圖建立不安全的 HTTPS 連線的話,NSURLSession 就拒絕連線並且回傳 Error 物件。但是這種狀況下,你還是要先想辦法把連線建立起來,才有辦法在 Server 還在開發中的狀況下也寫點 Client Side 的程式。

Read more...

2016年10 月 posted by admin in 程式&軟體 and have No Comments

[iOS]如何同時存在新舊兩套Xcode

身為iOS的開發人員很常會遇到iOS升級,Xcode也要跟著升級才能繼續開發

但很奇怪的是iOS每次升級,舊的APP就一定有問題,寫法都會有不相容新的SDK

勢必就要一一的去修正(真不懂為什麼Android就不用這麼麻煩)

有時候APP很趕著要上架,沒空一一修正和改寫不相容的錯誤

這時一個舊版的Xcode就很重要了,以下就教你如何安裝新舊兩套版本的Xcode

Read more...

2016年10 月 posted by admin in 程式&軟體 and have No Comments

[轉]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...

2016年7 月 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...

2016年3 月 posted by admin in 程式&軟體 and have No Comments

Don't reboot it just patch

心有戚戚焉?

Read more...

2016年3 月 posted by admin in 影視娛樂 and have No Comments