Ta da:
NSInteger myInteger = 42;
int myInt = (int) myInteger;
NSInteger
is nothing more than a 32/64 bit int. (it will use the appropriate size based on what OS/platform you’re running)
More Related Contents:
- Subclassing NSOutlineView [closed]
- What’s the Best Way to Shuffle an NSMutableArray?
- Execute a terminal command from a Cocoa app
- Why shouldn’t I use Objective C 2.0 accessors in init/dealloc? [closed]
- Why are Objective-C delegates usually given the property assign instead of retain?
- Deep copying an NSArray
- How to compare two dates in Objective-C
- Compiler error: “initializer element is not a compile-time constant”
- How to find out who called a method?
- Trouble with floats in Objective-C
- Using NSPredicate to filter an NSArray based on NSDictionary keys
- self.variable and variable difference [duplicate]
- Run NSRunLoop in a Cocoa command-line program
- How do I make and use a Queue in Objective-C?
- What is the visibility of @synthesized instance variables?
- Implementing -hash / -isEqual: / -isEqualTo…: for Objective-C collections
- iTunes Song Title Scrolling in Cocoa
- Removing duplicates from NSMutableArray
- strong / weak / retain / unsafe_unretained / assign
- How to limit NSTextField text length and keep it always upper case?
- Front most window using CGWindowListCopyWindowInfo
- What does Apple mean when they say that a NSManagedObjectContext is owned by the thread or queue that created it?
- Saving a NSArray
- NSString instance reports its class as NSCFString
- Cocoa/ Objective-C Shell Command Line Execution
- Xcode linker error: file too small for architecture x86_64
- What’s the difference between [NSNull null] and nil?
- viewDidLoad in NSViewController?
- +[NSString stringWithString:] — what’s the point?
- Listen to a value change of my text field