I want my users to draw an image on their screen in landscape mode.
When a button is pressed, this image should be stored locally on the device.
I use this sample code below, which runs vertically http://www.ipodtouchfans.com/forums/showthread.php?t=132024
My problem is that I am trying to set up the code for landscape mode with a smaller drawing area, but it does not work. I'm not sure why?
There seem to be three areas that are related to borders that the user can draw. I tried resizing, but this does not 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)]; ... }
iphone
butchcowboy
source share