Thursday, February 16, 2012

How to get CGRect from NSValue ?


CGRect a = CGRectMake(0, 0, 12, 12);
CGRect b = CGRectMake(0, 15, 13, 13);
NSArray *array=[[NSArray alloc]initWithObjects:[NSValue valueWithCGRect:a]

//Get CGRect from NSValue
CGRect sectionRect = [[array objectAtIndex:0] CGRectValue];



1 comment: