I recently began using Parse.com with swift and I am trying to create a simple app loading data into a table. In using the class PFQueryTableViewController, I found that the following code must be used:
override init!(style: UITableViewStyle, className: String!) {
super.init(style: style, className: className)
}
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.parseClassName = "MyClass"
self.pullToRefreshEnabled = true
self.paginationEnabled = true
self.objectsPerPage = 50
}
My question is why must initialization of this class be called twice? and what are these initializations accomplishing?
Code was taken from this question: PFQueryTableViewController in Swift using Cloud Code function