ios4 - how to make the background of UITableView cell transparent in iphone? -


i wrote following code make cell transparent uitableview

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ static nsstring *cellidentifier = @"nsubject"; subjectscell *cell = (subjectscell*)[tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) {     [[nsbundle mainbundle] loadnibnamed:@"mysubjectcell" owner:self options:nil];            cell=subjcell;     uiview* backgroundview = [ [ [ uiview alloc ] initwithframe:cgrectzero ] autorelease ];      cell.backgroundview = backgroundview;     ( uiview* view in cell.contentview.subviews )      {         view.backgroundcolor = [ uicolor clearcolor ];     } } [cell settitle:[subjectsarr objectatindex:indexpath.row]]; return cell; 

}

anybody can me

in viewdidload can add

self.tableview.backgroundcolor = [uicolor clearcolor]; 

you not need make own view have above.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -