Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot specialize non-generic type 'UIViewController'

I am trying to use UIScrollViewDelegate:

class ViewController: UIViewController <UIScrollViewDelegate> {}

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

like image 538
Nikita Zernov Avatar asked May 04 '15 19:05

Nikita Zernov


1 Answers

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

class ViewController: UIViewController, UIScrollViewDelegate {}
like image 79
rdelmar Avatar answered Oct 16 '22 04:10

rdelmar