Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protocol CustomDrawing {}
- extension CustomDrawing where Self: UIView {
- func myDrawingCode() {
- // Whatever
- }
- }
- class CustomLabel: UILabel, CustomDrawing {
- override func draw(_ rect: CGRect) {
- super.draw(rect)
- myDrawingCode()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement