Cannot specialize non-generic type 'UIViewController'
Asked Answered
V

1

7

I am trying to use UIScrollViewDelegate:

class ViewController: UIViewController <UIScrollViewDelegate> {}

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

Verret answered 4/5, 2015 at 19:25 Comment(0)
L
18

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

class ViewController: UIViewController, UIScrollViewDelegate {}
Lanita answered 4/5, 2015 at 19:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.