Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let label = UILabel()
- let button = UIButton()
- let input1 = UITextField()
- override func viewDidLoad() {
- super.viewDidLoad()
- label.frame = CGRect(x: 24, y: self.view.frame.height - 60, width: self.view.frame.width - 48, height: 60)
- label.text = "Coucou"
- button.frame = CGRect(x: 24, y: label.frame.origin.y - (60), width: self.view.frame.width - 48, height: 60)
- button.setTitle("Button Title", for: .normal)
- button.backgroundColor = UIColor.green
- input1.frame = CGRect(x: 24, y: button.frame.origin.y - (60), width: self.view.frame.width - 48, height: 60)
- input1.backgroundColor = UIColor.green
- self.view.addSubview(label)
- self.view.addSubview(button)
- self.view.addSubview(input1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement