For my application I am trying to store CGRect
objects into an NSMutableArray
. It is loading well and printing in the log statement, but trying to take the CGRect
s from the array shows an error. Here is a code snippet:
CGRect lineRact = CGRectMake([[attributeDict objectForKey:@"x"] floatValue],
[[attributeDict objectForKey:@"y"] floatValue],
[[attributeDict objectForKey:@"width"] floatValue],
[[attributeDict objectForKey:@"height"] floatValue]);
[lineRactangle addObject:NSStringFromCGRect(lineRact)];
How can I get the rects back from the array?
[lineRactangle addObject:[NSValue valueWithCGRect:lineRect]];