ios - insertSublayer will hide cells in table view -
this code works in ios7, when running in ios6 simulator cells should above sublayer instead below them.
bglayer = [backgroundlayer gradientfromcolor:color_mid_gradient to:color_gradient]; cgrect bottom = self.view.bounds; bottom.origin.y = self.view.bounds.size.height-gradient_height; bottom.size.height = gradient_height; bglayer.frame = bottom; [self.view.layer insertsublayer:bglayer atindex:1]; what put gradient-layer @ bottom of view tableview.
however, cells in rect of gradient hidden behind it!
i tried change index doesnt anything. also, insertsublayer: below: doesn't work either.
what missing? how put layer below table view cells?
thanks.
thanks trojanfoe got pointed in right direction.
i've managed working manually changing zposition conflicting layers. though have run add layer-code in viewdidappear instead of viewwillappear ios6. don't ask me why, guess has rendering of cells happening after viewwillappear.
Comments
Post a Comment