Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
iOS Development
NSInteger vs. NSNumber
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Nethfel" data-source="post: 1304877" data-attributes="member: 89124"><p>Int is a scalar data type that is part of C. NSNumber is an objective C class that is a subclass of NSValue. NSValue is designed to store non-objective-c classes (ie: pointers, char, int, NSRange (which is a struct), CGSize (struct), CGRect (struct), etc. - see Apple docs for all of the types of data an NSValue object can store).</p><p></p><p>NSNumber is a specific subclass of NSValue - it's sole purpose is to deal with numeric scalar C data types (ie: int, float, double, etc.).</p><p></p><p>I can't compare it to C# as I don't know C#.</p></blockquote><p></p>
[QUOTE="Nethfel, post: 1304877, member: 89124"] Int is a scalar data type that is part of C. NSNumber is an objective C class that is a subclass of NSValue. NSValue is designed to store non-objective-c classes (ie: pointers, char, int, NSRange (which is a struct), CGSize (struct), CGRect (struct), etc. - see Apple docs for all of the types of data an NSValue object can store). NSNumber is a specific subclass of NSValue - it's sole purpose is to deal with numeric scalar C data types (ie: int, float, double, etc.). I can't compare it to C# as I don't know C#. [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
iOS Development
NSInteger vs. NSNumber
Top