AutoCat/AutoCat/Views/CustomButton.swift
2020-04-02 11:31:25 +03:00

15 lines
289 B
Swift

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
}
}