07 2021 档案

摘要:一、代码示例 // // ViewController.swift // LazyTest // // Created by lilun.ios on 2021/7/30. // import UIKit class ViewController: UIViewController { lazy v 阅读全文
posted @ 2021-07-30 19:00 兜兜有糖的博客 阅读(410) 评论(0) 推荐(0) 编辑
摘要:一、示例代码 import UIKit let obj = TestObj() class TestObj { init() { print("\(type(of: self)) init") } } class ViewController: UIViewController { func tes 阅读全文
posted @ 2021-07-23 15:45 兜兜有糖的博客 阅读(575) 评论(0) 推荐(0) 编辑
摘要:一、背景 Swift具备完善的Error handle机制,对于纯Swift下面的Error,在编码的时候能够正确处理。 在使用try? 处理抛出Error的方法的时候,会忽略Error,直接返回nil 二、Swift 与 Objc下面的Exception 下面的代码是经常遇到的一种场景,Swift 阅读全文
posted @ 2021-07-13 16:08 兜兜有糖的博客 阅读(118) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示