user804417
user804417

Reputation: 165

How to use protocol extensions with where clause

protocol aView: class { } 

extension aView where Self: UIView { }

Can any one please help me to understand this code?

Upvotes: 3

Views: 2957

Answers (1)

shallowThought
shallowThought

Reputation: 19602

Your extension extends functionality to all types that:

  • conform to aView

and

  • are of type UIView

Upvotes: 11

Related Questions