views:

744

answers:

2

Hi all,

I want to set some background image of uitoolbar in my iphone application.

Currently i am setting by using the initwithpatternimage method of uicolor.

But its not doing what i want.

Kindly sujjest some other solution.

+1  A: 

See this recent question: Custom logo on top of UINavigationBar?

Paul Lynch
A: 

Or you can Make custom class and assign it to your control (through interface builder) and inside that implement drawRect method...

like

- (void)drawRect:(CGRect)rect {
    UIImage *image = [UIImage imageNamed: @"CustomImage.png"];
    [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
mihirpmehta