Protocol extension in Swift 3 [duplicate]
问题 This question already has an answer here : EXC_BAD_ACCESS Using IBInspectable (1 answer) Closed 2 years ago . I want to have a default property of UIImageView , which would be isFlipped . I am able to do it by subclassing UIImageView and adding one property isFlipped . But I want to user protocol and extensions for this , but it is crashing after sometime. Below is my code. How can I use it in right way? Thanks import Foundation import UIKit protocol FlipImage { var isFlipped: Bool { get set