对于我的应用程序,我试图将CGRect
对象存储到NSMutableArray
. 它加载良好并在日志语句中打印,但尝试CGRect
从数组中获取 s 会显示错误。这是一个代码片段:
CGRect lineRact = CGRectMake([[attributeDict objectForKey:@"x"] floatValue],
[[attributeDict objectForKey:@"y"] floatValue],
[[attributeDict objectForKey:@"width"] floatValue],
[[attributeDict objectForKey:@"height"] floatValue]);
[lineRactangle addObject:NSStringFromCGRect(lineRact)];
如何从数组中取回矩形?