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 10-21-2010, 01:09 PM   #1 (permalink)
Registered Member
 
Join Date: Oct 2010
Location: delhi india
Age: 24
Posts: 120
vijay.adhikari is on a distinguished road
Send a message via Skype™ to vijay.adhikari
Default moving image

Hello friends

i m working in an app and..... in this all i want is that when my image count is more than 4 it automatically move to any other location ..in this there r 2 views whn i drag and drop an image on dat view and again click on button to genrate image , again drag n drop to same view ...whn this image count reach to 5 the 5th image automatically move from that view 2 any other location .....

- (void)touchesMovedNSSet *)touches withEventUIEvent *)event {
NSLog(@"Main view Touches moved");
UITouch *touch = [[event allTouches] anyObject];
CGPoint touchLocation = [touch locationInView:self.view];
//if (touchLocation.x < 234) {
tempView.center = touchLocation;

//}
}
- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event {
NSLog(@"Main view Touches ended");
UIImageView *localViewAtStaff;
UITouch *touch = [[event allTouches] anyObject];
localViewAtStaff = (UIImageView *)[touch view];
CGPoint touchLocation = [touch locationInView:self.view];
NSLog(@"x %f and y %f",touchLocation.x,touchLocation.y);
for(UIView *test in [self.view subviews]) {
CGPoint staffViewPoint =[self.view convertPoint:touchLocation toView:test];
if ([test isKindOfClass:[StaffView class]] && [test pointInside:staffViewPoint withEvent:event]) {
[test touchesEnded:touches withEvent:event];

if ([test totalCount] == 5) {
CGPoint touchLoc;
touchLoc.x = 234;
touchLoc.y = 38;
localViewAtStaff.center =touchLoc ;
}

}
}
vijay.adhikari is offline   Reply With Quote
Old 10-21-2010, 04:23 PM   #2 (permalink)
Banned
 
Join Date: May 2010
Location: New Jersey
Posts: 595
Chessin is on a distinguished road
Send a message via AIM to Chessin
Default

Quote:
Originally Posted by vijay.adhikari View Post
Hello friends

i m working in an app and..... in this all i want is that when my image count is more than 4 it automatically move to any other location ..in this there r 2 views whn i drag and drop an image on dat view and again click on button to genrate image , again drag n drop to same view ...whn this image count reach to 5 the 5th image automatically move from that view 2 any other location .....

- (void)touchesMovedNSSet *)touches withEventUIEvent *)event {
NSLog(@"Main view Touches moved");
UITouch *touch = [[event allTouches] anyObject];
CGPoint touchLocation = [touch locationInView:self.view];
//if (touchLocation.x < 234) {
tempView.center = touchLocation;

//}
}
- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event {
NSLog(@"Main view Touches ended");
UIImageView *localViewAtStaff;
UITouch *touch = [[event allTouches] anyObject];
localViewAtStaff = (UIImageView *)[touch view];
CGPoint touchLocation = [touch locationInView:self.view];
NSLog(@"x %f and y %f",touchLocation.x,touchLocation.y);
for(UIView *test in [self.view subviews]) {
CGPoint staffViewPoint =[self.view convertPoint:touchLocation toView:test];
if ([test isKindOfClass:[StaffView class]] && [test pointInside:staffViewPoint withEvent:event]) {
[test touchesEnded:touches withEvent:event];

if ([test totalCount] == 5) {
CGPoint touchLoc;
touchLoc.x = 234;
touchLoc.y = 38;
localViewAtStaff.center =touchLoc ;
}

}
}
I am going to give you a few hints on why no one answers your posts.
1. Use the Code tages its the # logo in the top
2. I understand that you may not know english that well, but there are many translators out there. ex: Google translate ... translate.google.com
3. You have to be more specific on what your problem is for people to help
Chessin 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: 343
10 members and 333 guests
condor304, Desert Diva, Domele, dre, mottdog, oceanlablight, palme2elie, Paul Slocum, schmallegory
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,658
Threads: 94,118
Posts: 402,895
Top Poster: BrianSlick (7,990)
Welcome to our newest member, palme2elie
Powered by vBadvanced CMPS v3.1.0

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