аутлет кнопки:
nextButtonOutlet?.alpha = 0.5
nextButtonOutlet.layer.cornerRadius = nextButtonOutlet.frame.size.height / 5
nextButtonOutlet.layer.shadowColor = UIColor.black.cgColor
nextButtonOutlet.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
nextButtonOutlet.layer.masksToBounds = false
nextButtonOutlet.layer.shadowRadius = 1.0
nextButtonOutlet.layer.shadowOpacity = 0.5
экшн:
@IBAction func nextPressed(_ sender: UIButton) {
UserSettings.userWeight = "weightSet"
if sender.isSelected {
if let weight = Double(textFieldOutlet.text!) {
weightMan = weight
}
}
}