Before converting my Xcode project to Swift 2 I had the following function that I was using to parse my TMX level files. It provided a variable attributeDict to use within the function.
func parser(parser: NSXMLParser, didStartElement elementName: String, namespaceURI: String?, qualifiedName qName: String?, attributes attributeDict: [NSObject : AnyObject]) {
// my function code
}
After converting to Swift 2 (I am now on 2.1.1), I was prompted to change it to an @objc func and change some of the syntax. Now where the variable attributeDict was accessible within the function, now the variable is not created, leaving numerous errors
@objc func parser(parser: NSXMLParser, didStartElement elementName: String?, namespaceURI: String?, qualifiedName qName: String?, attributes: attributeDict<NSObject,AnyObject>) {
// my function code
}
I must have changed the syntax incorrectly but can't work out, from the documentation, what I've done wrong. Hoping it's obvious to someone else. Any assistance would be much appreciated.