objective-c - 在 Objective-C 中将 @ 放在整数前意味着什么?

标签 objective-c objective-c-literals

在 Objective-C 中将 @ 放在整数前意味着什么? 像这样:

@4

最佳答案

它是 NSNumber 文字。一个捷径:

[NSNumber numberWithInt:4];

关于objective-c - 在 Objective-C 中将 @ 放在整数前意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17629874/

相关文章:

iphone 开发 : how to set a property of an another viewController then reach it

objective-c - 通过 mutableCopy 或 arrayWithArray : 创建一个带有文字的 NSMutableArray

objective-c - 有没有办法在 Xcode 4.4 中获得简洁的 Objective-C 文字索引功能?

ios - NSNumber 原始值相等与 isEqualToNumber 与 Obj-C 文字

iphone - 如何获取 NSString 的大小

ios - 将 float 四舍五入为下一个整数 0.5

objective-c - 从带括号的 NSDictionary 与 objectForKey : or valueForKey: 中提取值

objective-c - Objective-C 的新文字语法可以模仿 addObject 吗?

objective-c - 为什么 ((self=[super init]]) 有效,但 (!(self=[super init])) 无效?

ios - UICollectionView insertSections 错误 - NSInvalidArgumentException 原因 setObjectForKey 对象不能为 nil UICollectionViewItemKey