New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Xcode Problem - dragging images


Post Reply New Thread Subscribe

 
Thread Tools
newbie1

 
Member Since: Oct 07, 2010
Posts: 2
newbie1 is on a distinguished road

newbie1 is offline
Hi, iv found this tutorial on dragging 2 things at the one time:

YouTube - iPhone SDK Tutorial - Dragging more than 1 image around on the screen

To do so it says to use the following code:

Code:
@implementation exampleViewController

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
	
	UITouch *touch = [[event allTouches] anyObject];
	
	if ([touch view] == image1) {
		CGPoint location = [touch locationInView:self.view];
		image1.center = location;
	}
	
	if ([touch view] == image2) {
		CGPoint location = [touch locationInView:self.view];
		image2.center = location;
	}
}
For some reason when i test my app on the device and in simulator, i get no errors but the images remain still.

Can anyone explain why ?

Thanks
QUOTE Thanks

Post Reply New Thread Subscribe


« Installing 10.6 SDK | installation problem with g77 »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
PowerBook G4 Problem (Jumbled Screen Images) g4user Apple Notebooks 2 04-21-2010 03:12 AM
Unusual airport problem timloudon Internet, Networking, and Wireless 6 02-25-2010 08:26 PM
I have a mind boggling iPhone 3g sync problem sedouard iOS and Apps 4 04-03-2009 03:54 AM
Huge Graphics Problem With Magic Garage Band mattcooper87 OS X - Apps and Games 0 08-21-2007 09:23 AM
problem with encrypted disk images...HELP! greenapple OS X - Operating System 1 11-10-2005 06:28 AM

All times are GMT -4. The time now is 10:10 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?