I finally figured it out...only took a couple of days but I've been too busy to post up a solution. We'll I finally got time and am happy to post my solution. I had a hunch that this would'nt work unless it was done 100% programmatically, and I was right. Here's the final solution to my problem:
if(mute == YES)
{
UIImage *image = [UIImage imageNamed:@"audio-off.png"];
UIButton *myMuteButton = [UIButton buttonWithType:UIButtonTypeCustom];
myMuteButton.bounds = CGRectMake( 0, 0, image.size.width, image.size.height );
[myMuteButton setImage:image forState:UIControlStateNormal];
[myMuteButton addTarget:self action:@selector(mute) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *myMuteBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:myMuteButton];
navBar.leftBarButtonItem = myMuteBarButtonItem;
[myMuteBarButtonItem release];
}
else
{
UIImage *image = [UIImage imageNamed:@"audio-on.png"];
UIButton *myUnmuteButton = [UIButton buttonWithType:UIButtonTypeCustom];
myUnmuteButton.bounds = CGRectMake( 0, 0, image.size.width, image.size.height );
[myUnmuteButton setImage:image forState:UIControlStateNormal];
[myUnmuteButton addTarget:self action:@selector(mute) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *myUnmuteBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:myUnmuteButton];
navBar.leftBarButtonItem = myUnmuteBarButtonItem;
[myUnmuteBarButtonItem release];
}
the good news is I finally finished my app and submitted it to the app store. Hopefully everything will go smooth and am looking forward to it!