27

深入了解 iOS 的初始化

 4 years ago
source link: https://juejin.im/post/5dd24e3ff265da0bbc3067ae
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
初始化 在 iOS 里面,无论是 Objective-C 还是 Swift,类(结构体、枚举)的初始化都有一定的规则要求,只不过在 Objective-C 中会比较宽松,如果不按照规则也不会报错,但会存在隐患,而在 Swift 则需要严格按照规则要求代码才能编

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK