How can I add a boolean value to a NSDictionary?

You use NSNumber.

It has init… and number… methods that take booleans, just as it does integers and so on.

From the NSNumber class reference:

// Creates and returns an NSNumber object containing a 
// given value, treating it as a BOOL.
+ (NSNumber *)numberWithBool:(BOOL)value

and:

// Returns an NSNumber object initialized to contain a
// given value, treated as a BOOL.
- (id)initWithBool:(BOOL)value

and:

// Returns the receiver’s value as a BOOL.
- (BOOL)boolValue

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)