It seems when i use addSubview to add an image to my viewcontroller, the view is turned to it's view when it loads. Any reason why and how to fix? Here's my code if needed:
let target = Targets[i]
bullet = UIImageView(image: UIImage(named:"BulletHole"))
bullet.frame = CGRectMake(target.center.x,target.center.y,20,20)
bullet.hidden = false
self.view.addSubview(bullet)
Your image not moving seems to be due to the view inheritance that the line self.view.addSubview(bullet)
expresses. With this, you are pasting the image onto the whole view itself. If you want it to move with another image you have two options:
Move the bullet hole the same way as you move the other image, or
add the bullet hole as a subview of the view that is moving, NOT the main view (as in self.view
)