Have you been wondering how to create a class and use it as an object in Objective-C?
Anyone who is used to object-oriented programming will recognize the pattern demonstrated here. You will learn how……
前言
Emmmmm... Objective-C Class Properties 早在 WWDC 2016 中就已经公示,给 Objective-C 加入这个特性主要是为了与 Swift 类型属性相互操作。
官方是这么说明的:
Interoperate with Swift type properties.
嘛 ...……
【Objective-C注意要点】
1、没有C++中的bool值,对应的类型为BOOL,聚会为YES、NO.
2、定义
@interface Car
{
int m_nWeight;
int m_nSpeed;
}
@property int m_nWeight;
@proprety (readonly) int m_nSpeed;
// 名 ...……