Wednesday 15 February 2012

ios - Adding UI elements to a PFQueryTableViewController/UITableViewController? -



ios - Adding UI elements to a PFQueryTableViewController/UITableViewController? -

i curious if able override appeareance of how pfquerytableviewcontroller looks (not cells or table itself). illustration right adding search bar programatically header of tableview. issue i'm having when user scrolls tableview header goes it, , want stick. know can accomplish making uiviewcontroller uitableview, wondering if there way add together above tableview in pfquerytableviewcontroller (subclass of uitableviewcontroller believe if i'm not total noob?), or header stick?

here how have searchbar adding pfquerytableviewcontroller in viewdidload:

uitableviewcontroller *searchresultscontroller = [[uitableviewcontroller alloc] initwithstyle:uitableviewstyleplain]; searchresultscontroller.tableview.datasource = self; searchresultscontroller.tableview.delegate = self; self.searchcontroller = [[uisearchcontroller alloc] initwithsearchresultscontroller:searchresultscontroller]; [[uisearchbar appearance]setbackgroundcolor:[uicolor clearcolor]]; self.searchcontroller.searchresultsupdater = self; self.searchcontroller.searchbar.frame = cgrectmake(self.searchcontroller.searchbar.frame.origin.x, self.searchcontroller.searchbar.frame.origin.y, self.searchcontroller.searchbar.frame.size.width, 44.0); self.tableview.tableheaderview = self.searchcontroller.searchbar; self.definespresentationcontext = yes; [self.searchcontroller.searchbar setplaceholder:@"what looking for?"];

ios objective-c iphone uitableview

No comments:

Post a Comment