Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
-(void)box {
int age = 22;
NSNumber* ageBoxed;
ageBoxed = @(age);
NSLog(@"%@", ageBoxed);
}
-(void)unbox {
int age = 22;
NSNumber* ageBoxed;
ageBoxed = @(age);
int unboxed = (int)ageBoxed;
NSLog(@"%d", unboxed);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.