6
votes

I am trying to use UIScrollViewDelegate:

class ViewController: UIViewController <UIScrollViewDelegate> {}

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

1

1 Answers

18
votes

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

class ViewController: UIViewController, UIScrollViewDelegate {}