I recommend you'd give a better title for your post. Including the error message is one way, if it's not too long.And you also show what version of Xcode you are using, just adding something like Xcode 6.4 on OS X 10.10.4 would be useful in many cases.I assume this sort of lines: /may be modified by the article editor's copying feature and your original code would be something like this: // Do any additional setup after loading the view, typically from a nib.as in the code template generated by Xcode. You'd better post-edit your code after pasting it.So, if I try to get the message Expected declaration, I need to write some other codes, other than your code shown above.Are you sure your source file does not contain any other codes?
Topic:
Programming Languages
SubTopic:
Swift
Tags: