黑马程序员技术交流社区

标题: 关于 NSMutableString 属性的问题 [打印本页]

作者: liusuizuoyou    时间: 2015-8-5 19:18
标题: 关于 NSMutableString 属性的问题
本帖最后由 liusuizuoyou 于 2015-8-5 19:19 编辑
  1. int main(int argc, const char * argv[]) {
  2.     @autoreleasepool {
  3.         NSMutableString *str=[NSMutableString stringWithFormat:@"xxxx"];
  4.         str.string=@"oooo";
  5.         NSLog(@"str=%@",str);
  6.    
  7.           }
  8.     return 0;
  9. }
复制代码

不太明白   string 为什么可以做为  对象 str  的属性进行赋值。
  打印出来的结果是  “oooo”






欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2