Expected Declaration Error using Swift Expected Declaration Error using Swift xcode xcode

Expected Declaration Error using Swift


The problem is that you need to put your code inside a method. All you need is to move it to viewDidLoad() or any other method.