0

i have this error :

Type 'CategoryTableViewController' does not conform to protocol 'XMLParserDelegateCategory'

in this code:

class CategoryTableViewController: UITableViewController, XMLParserDelegateCategory {

var parser = CategoryParser(url: kURL) var parsedItems: [CategorySchemes] = [] override func viewDidLoad() { super.viewDidLoad() title = "Navigation Mode" parser.delegate = self parser.parse { self.tableView.reloadData() } } 

And my protocol is:

protocol XMLParserDelegateCodelist {

func XMLParserError(parser: CodeListParser, error: String) } 

class CodeListParser: NSObject, NSXMLParserDelegate {

let url: NSURL var delegate: XMLParserDelegateCodelist? 

any suggestions? Thanks.

1 Answer 1

1

Implement func XMLParserError(parser: CodeListParser, error: String) in your view controller.

Sign up to request clarification or add additional context in comments.

2 Comments

i have implement : parser.delegate = self
No, you tell the parser that your view controller conforms to the protocol but you do not implement the function the protocol declares. I.e. where is the code for the XMLParserError function?