0

Im making a protocol but I only want it to be implementable by View Controllers. Im doing this to keep the code consistent and to try and avoid confusion for someone new to the project.

I was also wondering if by making a protocol only extendable by a UIViewController would I be able to access the UIViewControllers variables?

Ayrton CB
  • 170
  • 8

1 Answers1

3
protocol P where Self: UIViewControlller {

}
Alexander
  • 54,014
  • 10
  • 87
  • 136