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)touchesMoved

NSSet *)touches withEvent

UIEvent *)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 ;
}
}
}