Advice for a newbie

Hi man! It’s not that hard to add a box / button / view programmatically. Or even using storyboards. There’s a ton of YouTube videos and tutorials on swift so don’t worry! Look up swift UI or storyboards for drag and drop. If you want to do a view programmaticly try typing and pasting this (not next to the computer so let’s hope I can not make a mistake on my phone lol)

var myView = UIView() myView.backgroundColor = .red myView.translatesautoresozingmaskintoconsraints = false myView.centerY.constraint(equalTo: view.centerY).isActive = true myView.centerX.constraint(equalTo: view.centerY).isActive = true myView.height.constraint(equalToConstant: 100).isActive = true myView.width.constraint(equalToConstant: 100).isActive = true

/r/swift Thread