[NSMutableString string]和“”之间有什么区别?

时间:2011-05-07 16:56:25

标签: objective-c xcode

在self.currentProperty = [NSMutableString string]之后,我在xcode 4窗口的底部看到了那个东西上的无效表达式(你怎么称呼?显示所有监视变量,表达式等等)

如何初始化self.currentProperty,这是一个空字符串的NSMutableString对象?

1 个答案:

答案 0 :(得分:2)

您可以使用:

self.currentProperty = [NSMutableString stringWithCapacity:0];

但是

self.currentProperty = [NSMutableString string];

也应该没问题。

您能告诉我们您的财产是如何申报的吗?

相关问题