// 存: [array addObject:[NSValue valueWithCGPoint:point]];
// 取: CGPoint anotherPoint = [[array objectAtIndex:index] CGPointValue];
// 另外:
// 取: CGPoint anotherPoint = [[array objectAtIndex:index] CGPointValue];
// 另外:
xCoords = [NSArray arrayWithObjects:[NSNumber numberWithFloat:30.00], [NSNumber numberWithFloat:60.00], nil];
yCoords = [NSArray arrayWithObjects:[NSNumber numberWithFloat:30.00], [NSNumber numberWithFloat:60.00], nil];
for(int cnt=0; cnt<[xCoords count]; cnt++){
NSNumber *xNum = [xCoord objectAtIndex:cnt];
NSNumber *yNum = [yCoord objectAtIndex:cnt];
CGPoint point = CGPointMake(xNum.floatValue, yNum.floatValue);
}
原文地址:http://blog.sina.com.cn/s/blog_796ffec50100t93g.html