Proud Member
Proud Member

Reputation: 40506

Can I use KVC with primitive values?

Example:

@property (nonatomic, assign) BOOL running;

-valueForKey returns an id according to the documentation. But I slightly remember that KVC was so intelligent that it automatically wraps with NSNumber. Is that correct?

Upvotes: 3

Views: 314

Answers (1)

Ole Begemann
Ole Begemann

Reputation: 135558

Yes, your assumption is correct.

Upvotes: 6

Related Questions