tags:

views:

9

answers:

0

I am testing a nav based app on an older iTouch that has 3.1.3 loaded. The problem is that the nav buttons size (which use custom images) are too large for the nav bar. This is not the case on 4.0.

Any ideas? Below is the code I am using to create them.

    //add done bar button - goes to email
UIButton *btnDone = [UIButton buttonWithType:UIButtonTypeCustom];  
UIImage *imageDoneBtn = [[UIImage imageNamed:@"ButtonDone.png"]  
                               stretchableImageWithLeftCapWidth:10 topCapHeight:10];  
[btnDone setBackgroundImage:imageDoneBtn forState:UIControlStateNormal];  
[btnDone addTarget:self action:@selector(email:)  
        forControlEvents:UIControlEventTouchUpInside];
    btnDone.adjustsImageWhenDisabled = NO;
    btnDone.adjustsImageWhenHighlighted = NO;   
btnDone.frame = CGRectMake(0, 0, 49, 30);  
UIBarButtonItem *btnItemDone = [[[UIBarButtonItem alloc]  
                                       initWithCustomView:btnDone] autorelease];  
self.navigationItem.rightBarButtonItem = btnItemDone;