Objective-C 中 BOOL 类型的属性未初始化,那么它的值是默认YES/NO,还是随机的?
拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...
The default is NO.
The default value of basic data types in OC is 0, and the type 0 of BOOL represents NO
The BOOL type is a typedefed char type. When not initialized, it is the same as the C language, which is 0 in ASCII, and the same as 0000 in Unicode
Member variables have default values:
The default is NO.
The default value of basic data types in OC is 0, and the type 0 of BOOL represents NO
The BOOL type is a typedefed char type. When not initialized, it is the same as the C language, which is 0 in ASCII, and the same as 0000 in Unicode
Member variables have default values: