[iOS] Double value cannot be converted to Int because the result would be greater than Int.max
因為把 date.timeIntervalSince1970 * 1000 轉成 int 會出錯,所以改用 Int64 …
我要當一個豬頭,認真過每一天、快樂過每一天就好
因為把 date.timeIntervalSince1970 * 1000 轉成 int 會出錯,所以改用 Int64 …
我有一組 json 長的像醬子,要在 swift 裡 parse { “date”:[ {…
主程式: if let addr = getWiFiAddress() { le…
In Swift: if UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdi…
遇到使用 AirWatchSDK,拿到舊的版本是用 Swift 3.1 寫的,官方寫要用 xcode 8.3 來跑,但目…
class ViewController: UIViewController, UIGestureRecognizerD…
如何判斷 user 是否 idle timeout, 就是在 on touch 裡 reset 掉 timer cou…
有參數要傳給 dismiss 的 completion 要怎麼寫? Pretty easy, pass funcToCa…
UIAlert 彈 2次會出問題,解法: if presentedViewController == nil { sel…
Found a solution here. I’m probably doing it wrong but…