I want to allow my users to draw a picture on their screen in landscape mode.
Upon button being pressed, that image should be stored locally on the device.
I am using this code example below which works vertically http://www.ipodtouchfans.com/forums/showthread.php?t=132024
My problem is that I'm trying to adjust the code for landscape mode with a smaller drawing area but it's not working. I am not sure why?
There seems to be three areas that involve the bounds that the user may draw in. I've tried changing the size but that doesn't seem to work. What am I missing?
Orignally:
viewDidLoad:
drawImage = [[UIImageView alloc] initWithImage:nil];
drawImage.frame = self.view.frame;
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UIGraphicsBeginImageContext(self.view.frame.size);
[drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
...
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
UIGraphicsBeginImageContext(self.view.frame.size);
[drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
...
}