Im making a single view application where I want a UI image to move from one side of the screen to an other. I want to detect a touch on this image. I cannot use a button because I cannot make the button move. More precision: When i click on the UI image, I want a label to show and to not be hidden anymore. I cant use a UI button because while I click on the image, the image will be moving and buttons cannot move. I hope this is more clear. This is the code up to now:
@IBAction func Start1(sender: UIButton) {
Person1.center = CGPointMake(160, 450) ;
[UIView.animateWithDuration(3,
animations: { self.Person1.center = CGPointMake(160, 70 )
})];
}
@IBOutlet var Person1: UIImageView!
Thank you