pec*_*eco 0 properties objective-c ios
I have an NSObject class, which has some primitive properties:
@interface MyClass: NSObject
@property (nonatomic, assign) BOOL boolProp;
@property (nonatomic, assign) NSInteger intProp;
@end
Run Code Online (Sandbox Code Playgroud)
@implementation MyClass
// No init implemented
@end
Run Code Online (Sandbox Code Playgroud)
From what I experienced, when there is no init method, then the properties default to "reasonable" values (BOOL to NO, intProp to 0). Is this defined behaviour? If yes, is there any Apple documentation for this behaviour?
| 归档时间: |
|
| 查看次数: |
698 次 |
| 最近记录: |