Strong Like Bull
Strong Like Bull

Reputation: 11297

Declaring primitive type properties

I want to declare properties with ints and bools, for example:

@property(nonatomic,retain) bool signOutgoingFax;

The error I get is:

property 'signOutgoingFax' with 'retain' attribute must be of object type

Upvotes: 2

Views: 1451

Answers (1)

PengOne
PengOne

Reputation: 48398

You do not retain BOOL int or float. Simply use

@property(nonatomic) bool signOutgoingFax;

The point here is that the variable is declared as "BOOL", not "BOOL *" (this would be a pointer), and hence you should not use retain.

Upvotes: 6

Related Questions