ios - UITableView background does not set -
i have code within viewdidload (putting within viewdidappear didn't work either).
uiview *texturedbackgroundview = [[uiview alloc] initwithframe:self.view.bounds]; texturedbackgroundview.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"backgroundleather.png"]]; self.tableview.backgroundview = texturedbackgroundview; self.tableview.separatorstyle = uitableviewcellseparatorstylenone;
but cannot see background image. white - no image set. why that?
please note that, tableview has it's own controller - initialised :
appdelegate *del = (appdelegate*)[[uiapplication sharedapplication] delegate]; paphomeviewcontroller *vc = del.homeviewcontroller; vc.view.frame = self.containerview.bounds; [self.containerview addsubview:vc.view]; [self addchildviewcontroller:vc];
so, see background of containerview , not background of tableview.
trying didn't help :
[self.containerview setbackgroundcolor:[uicolor clearcolor]];
ios uitableview
No comments:
Post a Comment