Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rustywild

macrumors newbie
Original poster
Mar 9, 2011
20
0
I Have it:
Code:
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
} 
-(void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
	CGPoint newTouch = [[touches anyObject]locationInView:[self~CCC superview]]; // Error Expected':'before '~' token

 
	CGPoint lastTouch = [[touches anyObject]previousLocationInView:[self~CCC superview]];
	
	float xDif = newTouch.x - lastTouch.x;
	float yDif = newTouch.y - lastTouch.y;
	
	CGAffineTransform translate = CGAffineTransformMakeTranslation(xDif,~CCC yDif); 
	[self setTransform: CGAffineTransformConcat([self transform],~CCC translate)];
																	

} 
-(void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
} 
-(void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
	[self touchesEnded:touches withEvent:event]; 
}

@end

How i can repair?

thanx
 
Last edited by a moderator:
What is 'self~CCC' ?

I'm not sure you can use the character '~' in a variable name. this should probably be 'self.CCC'?
 
I copied the code from a book, I use it to move a photo with multitouch

Which book?

EDIT: Nevermind I see it. It seems to be a typesetting flaw in the eBook version of Rory Lewis' "IPHONE AND IPAD APPS FOR ABSOLUTE BEGINNERS" (who knows. maybe the hardcopy has the same issue). The screenshot of the code doesn't have ~CCC while the code block itself does. In other examples, code blocks include a stylized arrow to visually represent a carriage return, these ~CCCs seem to have been failed arrows.

The source code is available here: http://apress.com/book/downloadfile/4588

B
 
Last edited:
Which book?

EDIT: Nevermind I see it. It seems to be a typesetting flaw in the eBook version of Rory Lewis' "IPHONE AND IPAD APPS FOR ABSOLUTE BEGINNERS" (who knows. maybe the hardcopy has the same issue). The screenshot of the code doesn't have ~CCC while the code block itself does. In other examples, code blocks include a stylized arrow to visually represent a carriage return, these ~CCCs seem to have been failed arrows.

The source code is available here: http://apress.com/book/downloadfile/4588

B

thanx a lot. just erase ~CCC, and the app work fine
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.