tags:

views:

91

answers:

1

how to store cgrect in nsmutablearray and retrive them

+1  A: 

You need to wrap the CG structures in NSValue classes. So:

NSMutableArray* array = [NSMutableArray mutableArray];
[array addObject:[NSValue valueWithCGRect:CGRectMake(0,0,10,10)]];
CGRect someRect = [[array objectAtIndex:0] CGRectValue];
Jason Coco