Customize UIToolBar with Background Image

Posted by Taimur Hamza on Stack Overflow See other posts from Stack Overflow or by Taimur Hamza
Published on 2010-06-14T15:30:26Z Indexed on 2010/06/14 15:32 UTC
Read the original article Hit count: 710

hi,

I want to add a background image to my UIToolbar instance. This line of code doesnt work.

myToolBar.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Layer-1.png"]];

Another solution tht i found out from stackoverflow aint working as well

UIImage *myimage = [UIImage imageNamed:@"Layer-1.png"];

myToolBarImage.image = myimage;

[self.view addSubview:myToolBarImage]; [self.view sendSubviewToBack:myToolBarImage];

[self.view addSubview:myToolBar];

Kindly help me out. Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c