如何正确在NSMutableDictionary中加入一个变量int

看代码,都是如下形式:

[dict setObject:@5 forKey:MESSAGE_ID];

如果我是变量怎么办?

[dict setObject:@(msgId) forKey:MESSAGE_ID];

希望对大家有所帮助。

猜你喜欢

转载自blog.csdn.net/quantum7/article/details/80673626