Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 691
user804417 Avatar asked Nov 26 '25 14:11

user804417


1 Answers

Your extension extends functionality to all types that:

  • conform to aView

and

  • are of type UIView
like image 106
shallowThought Avatar answered Nov 28 '25 16:11

shallowThought