Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-09-2010, 05:15 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 62
farazhaider88 is on a distinguished road
Default drag/touch multiple images

hi ;

i have attached a image for more understanding.
the problem im facing rightnow is that in an above portion i have scrollview which have different images clicking on it will clone a same image on to the screen. i have enable touches so i can drag it, but when i clicked another image and it comes to the screen i can drag that anotther image but not the previous one now. can any one have a solution so i can drag multiple images on clicking on it. i can put 4-5 on it for my use.

i have use this code:
Code:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{	
	UITouch *touch=[[event allTouches]anyObject];
	CGPoint location = [touch locationInView:touch.view];
	g1.center = location;

	}

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

thanks in advance.
Attached Images
File Type: jpg 1.jpg (20.4 KB, 4 views)
farazhaider88 is offline   Reply With Quote
Old 09-09-2010, 03:46 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 62
farazhaider88 is on a distinguished road
Default

any one??
farazhaider88 is offline   Reply With Quote
Old 09-13-2010, 11:51 PM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 62
farazhaider88 is on a distinguished road
Default

??
farazhaider88 is offline   Reply With Quote
Old 09-14-2010, 12:05 AM   #4 (permalink)
Pro. Game Developer
iPhone Dev SDK Supporter
 
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,176
Kalimba is on a distinguished road
Default

Quote:
Originally Posted by farazhaider88 View Post
i have use this code:
Code:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{	
	UITouch *touch=[[event allTouches]anyObject];
	CGPoint location = [touch locationInView:touch.view];
	g1.center = location;

	}

-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
	
	[self touchesBegan:touches withEvent:event];
}
Based on this code, you're only handling one of the touch events. Look up the UIEvent Class Reference, see what 'allTouches' returns, and go from there.
__________________
~~ Word Flurry ~~ App Store / Website / Facebook
Kalimba is offline   Reply With Quote
Old 09-14-2010, 02:23 AM   #5 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

yes.

maybe this can help
Move multiple object with touch in iPhone | iPhone Tutorials & iPhone Development
__________________
dany_dev is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On



» Advertisements
» Online Users: 332
10 members and 322 guests
bignoggins, carlandrews, flamingliquid, hzwegjxg, ilmman, jenniead38, linkmx, nadav@webtview.com, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:51 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0