I am creating a game that generates a playing card on a button click. I'm using this code to do this:
var imageView = UIImageView(frame: CGRectMake(CGFloat(pos), 178, 117, 172));
var image = UIImage(named: "\(deck[Int(card)])_of_\(suits[Int(arc4random_uniform(4))])")
imageView.image = image
self.view.addSubview(imageView)
But I have another button that resets the game. I want to be able to remove only the cards added programatically. Any help on this will be appreciated.