Failed to set () user defined inspected property on (UIButton)

后端 未结 6 1207
青春惊慌失措
青春惊慌失措 2021-01-17 09:50

In a simple ViewController, I added one UIButton. I would like to use \"User Defined Runtime Attributes\". For now I added the default Bool attribute.

The b

6条回答
  •  被撕碎了的回忆
    2021-01-17 10:08

    Another way to set the set a property value in the Interface Builder is that create an IBOutlet of your view on your view controller.

    @IBOutlet weak var yourView: UIView!
    
    
    yourView.layer.shadowOffset = CGSize(width: 0, height: 1)
    yourView.layer.shadowColor = UIColor.lightGray.cgColor
    yourView.layer.shadowOpacity = 1
    yourView.layer.shadowRadius = 5
    yourView.layer.masksToBounds = false
    yourView.layer.cornerRadius = 20
    

提交回复
热议问题