Advertisement
Guest User

Untitled

a guest
Nov 9th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.45 KB | None | 0 0
  1.    let happinessImage = UIImage(named: "ReadyHappiness")
  2.         let happinessButton = UIButton(type: .custom)
  3.         happinessButton.frame = CGRect(x: 0, y: 20 + view.frame.width/1.7 * 2 + 6, width: view.frame.width, height: view.frame.width/1.7)
  4.         happinessButton.setImage(happinessImage, for: .normal)
  5.         happinessButton.addTarget(self, action: #selector(buttonHappinessClick), for:.touchUpInside)
  6.         scrollView.addSubview(happinessButton)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement