7

I am trying to use UIScrollViewDelegate:

class ViewController: UIViewController <UIScrollViewDelegate> {}

But I have error: Cannot specialize non-generic type 'UIViewController'

Nikita Zernov
  • 5,465
  • 6
  • 39
  • 70

1 Answers1

18

Your syntax is incorrect. You don't use the brackets in Swift,

class ViewController: UIViewController, UIScrollViewDelegate {}
rdelmar
  • 103,982
  • 12
  • 207
  • 218