Question

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 CGRects 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?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top