ios - How to create property for BOOL objective c -


this question has answer here:

code:-

@property (nonatomic, retain) bool val; 

error:-

property ‘retain(or strong)’ attribute must of object type 

i want use bool object in class. creating in .h file

bool primitive type (thus not pointer, no memory management).

you declare property way :

@property (nonatomic) bool val; 

(you can explicitly write assign instead of strong/retain)


Comments