i want store my touchesMoved value in to NSArray how can i store that. now i try to store my touches moved value but i won't print value. here is my code
- (void)initWithSize:(int)nX height:(int)nY {
xWidth = nX;
yHeight = nY;
xArray = [[NSMutableArray alloc] initWithCapacity:xWidth];
for (int i = 0; i < xWidth; i++) {
yArray = [[NSMutableArray alloc] initWithCapacity:yHeight];
for (int j = 0; j < yHeight; j++) {
}
roomArray = [[NSArray alloc] initWithArray:yArray];
[xArray addObject:roomArray];
[roomArray release];
[yArray release];
}
i call this method like this
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
CGPoint currentPoint = [touch locationInView:self];
[self initWithSize:currentPoint.x height:currentPoint.y];
}
i print this value like this
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
NSString *myArrayString = [xArray description];
NSLog(@"screeX:%@ ",xArray);
}
but i did't get that pixels in my console output i got output like this
screeX:(
(
),
(
),
(
),
(
),
(
),
(
),
(
),
(