import UIKit

class CustomButton: UIButton {

    required init?(coder: NSCoder) {
        super.init(coder: coder)
        self.layer.cornerRadius = 6
    }

    override func layoutSubviews() {
        super.layoutSubviews()
        self.layer.opacity = self.isEnabled ? 1 : 0.5
    }
}
