i have getting CGPoint value in my array like this
@interface CanvasView : UIView{
NSMutableArray *_array;
}
@property (nonatomic, retain) NSMutableArray *_array;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
CGPoint currentPoint = [touch locationInView:self];
[_array addObject:[NSValue valueWithCGPoint: currentPoint]];
}
i have called this array in touchesEnded its working fine i will get values of nspoint
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"roomAtX:%@ ",_array);
PieClass *myPieClass=[[PieClass alloc]initWithFrame:CGRectMake(8, 297, 200, 300)];
[self addSubview:myPieClass];
}
this is my console out put
"NSPoint: {595, 158}",
"NSPoint: {558, 154}",
"NSPoint: {535, 152}",
"NSPoint: {518, 152}",
"NSPoint: {500, 160}",
"NSPoint: {482, 175}",
now i want use this array to another class so that i called this for my another class like this
- (void)drawRect:(CGRect)rect
{
CanvasView *cnava =[[CanvasView alloc]init];
NSLog(@"nextview:%@ ",cnava._array);
}
but here i get nextview:(null)
kindly guide how can access that array in other classes .