I am just creating a simple drawing program, I have been a developer for years now and I know I must be doing something insanely stupid but heres my code,
I don't know what i'm doing wrong but all this is supposed to do is create a small square on the screen this repeats in the touchesMoved void.
Nothing happens though, help would be much obliged.
HTML:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
CGPoint thumbPoint;
UITouch *thumb = [[event allTouches] anyObject];
thumbPoint = [thumb locationInView:thumb.view];
UIImageView *newImage = [[UIImageView alloc] initWithFrame:CGRectMake(thumbPoint.x, thumbPoint.y, 17, 17)];
newImage.image = [UIImage imageNamed:@"BlackDot.png"];
}
I don't know what i'm doing wrong but all this is supposed to do is create a small square on the screen this repeats in the touchesMoved void.
Nothing happens though, help would be much obliged.