カスタムビューのXCode表示
@IBDesignable class MyView: UIView { @IBInspectable var cornerRadius : CGFloat = 0.0; // Only override draw() if you perform custom drawing. // An empty implementation adversely affects performance during animation. override func draw(_ rect: CGRect) { // Drawing code self.layer.cornerRadius = cornerRadius if cornerRadius > 0 { self.clipsToBounds = true; } } }