Hi all..
I want to move my UIImageView only across the half screen. So i need help to understand what's exactly going on in this lines of code.
Is it better to put the imageView in an UIView and then i can only move the UIImageView in my UIView? But i don't understand how i can fix it!
Can anybody explain me the code: touchInLocation:self.view?
Thanx a lot for helping!
greez Franhu
// testtouchmovedViewController.h
#import <UIKit/UIKit.h>
@interface testtouchmovedViewController : UIViewController {
IBOutlet UIImageView *appleView;
}
@property (nonatomic,retain) UIImageView *appleView;
@end
// testtouchmovedViewController.m
- (void)touchesMoved

NSSet *)touches withEvent

UIEvent *)event {
// get touch event
UITouch *touch = [[event allTouches] anyObject];
CGPoint touchLocation = [touch locationInView:self.view];
if ([touch view] == appleView) {
// move the image view
appleView.center = touchLocation;
}
}