ios - I made the inheritance of classes, right or wrong? -
i had error "multiple inheritance classes 'baseviewcontroller' , 'pfquerytableviewcontroller'".tell me how out of situation?
i made inheritance. if it's right, not know why data not displayed when parsing?
my code
import uikit import parse import parseui class sportviewcontroller: baseviewcontroller { override func viewdidload() { super.viewdidload() addslidemenubutton() self.navigationitem.titleview = uiimageview(image: uiimage(named: "uklogo.png")) let querymatch = pfquery(classname: "betting") querymatch.addascendingorder("match") querymatch.findobjectsinbackground(block: { (objects:[pfobject]?, error:error?) in if error == nil { print (objects!.count) } else { } }) } override func viewwillappear(_ animated: bool) { super.viewwillappear(animated) } class sportviewcontroller: pfquerytableviewcontroller{ func tableview (_tableview:uitableview, cellforrowat indexpath: indexpath, object : pfobject?)-> pftableviewcell { let cell = tableview.dequeuereusablecell(withidentifier: "prognozcell", for: indexpath) as! eventcell cell.datalabel.text = object?.object(forkey: "data") as? string cell.matchlabel.text = object?.object(forkey: "match") as? string cell.proglabel.text = object?.object(forkey: "prognoz") as? string cell.notetext.text = object?.object(forkey: "note") as? string let imagefile = object?.object(forkey: "image") as? pffile cell.imagesp.image = uiimage(named: "sport1") cell.imagesp.file = imagefile cell.imagesp.loadinbackground() self.loadobjects() return cell } func tableview (_tableview:uitableview, heightforrowat indexpath: indexpath)-> cgfloat { if indexpath.row + 1 > (self.objects?.count)! { return 10 } let height = super.tableview(tableview, heightforrowat: indexpath) return height } } }
Comments
Post a Comment