Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 564
Proud Member Avatar asked Nov 21 '25 16:11

Proud Member


1 Answers

Yes, your assumption is correct.

like image 194
Ole Begemann Avatar answered Nov 24 '25 06:11

Ole Begemann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!