objective c - Change UIView background make view goes black -


i'm developing iphone app.

i have 2 methods change background image custom class inherits uiview:

- (void)showfiguremeter{     [levelmeter setbackgroundcolor:[uicolor clearcolor]];     uicolor *background = [[uicolor alloc]                            initwithpatternimage: [uiimage imagenamed:@"barrainferior.png"]];     levelmeter.backgroundcolor = background;     [background release]; }  - (void)showsizemeter {     nsstring* filename;     switch ([graphview shapeshown]) {         case circle:             filename = [[nsstring alloc]initwithstring:@"barracirculo.png"];             break;         case square:             filename = [[nsstring alloc]initwithstring:@"barracuadrado.png"];             break;         case triangle:             filename = [[nsstring alloc]initwithstring:@"barratriangulo.png"];             break;         case bridge:             filename = [[nsstring alloc]initwithstring:@"barrapuente.png"];             break;         case trapeze:             filename = [[nsstring alloc]initwithstring:@"barratrapecio.png"];             break;          default:             filename = [[nsstring alloc]initwithstring:@""];             break;     }      //[levelmeter setbackgroundcolor:[uicolor clearcolor]];     uicolor *background = [[uicolor alloc]                            initwithpatternimage: [uiimage imagenamed:filename]];     levelmeter.backgroundcolor = background;     [background release];     [filename release]; } 

on simulator works fine. on iphone image 'flick' , goes black.

any advice?

just debug print value of [graphview shapeshown].

nslog(@"case %d",[graphview shapeshown]); 

i think going default:


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 -