objective c - Setting background Image to uitableview? -


i want set image background uitableview. code using:

 self.tableview.backgroundcolor = [uicolor colorwithpatternimage:[uiimage imagenamed:@"background_tableview.png"]]; 

this showing image right table populated weird happens. parts of images shown in each tableviewcell , image scrolls along table. how can make image remains fixed , each tableviewcell doesn't show part of image?

thanks,
tc

you don't want set background of uitableview if don't want scroll. instead, want set background of uitableview transparent - , provide own fixed background behind uitableview.

to this, first set background of uitableview "clear color".

programmatically: self.tableview.backgroundcolor = [uicolor clearcolor];

you'll want un-check opaque checkbox.

programmatically: self.tableview.opaque = no;

setup fixed background want in view behind uitableview.

make sure sub-views in of uitableviewcells backgroundcolor = [uicolor clearcolor]; (uitextviews, etc.)

example xcode 4 / interface builder setup


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -