In my application (View based), the back buttons are not visible in the navigation bar. If I click that button, the actions works properly. It's very weird to me. The back button is visible and properly working in iPhone OS 3.0 and others.(Except OS 4.0). I am currently working in iPhone OS 4.0.
Here is my code:
UIButton *btn=[[UIButton alloc] init];
[btn setImage:[UIImage imageNamed:@"Back.png"] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
[btn setImageEdgeInsets:UIEdgeInsetsMake(0, 70, 0, 20)];
UIBarButtonItem *b=[[UIBarButtonItem alloc] initWithCustomView:btn];
self.navigationItem.leftBarButtonItem=b;
[b release];
[btn release];
Note: It doesn't work only iPhone OS 4.0. So how can I achieve this?
Simply you replace this code wherever you want and its working fine in OS 4.0.
I hope it will help ypu.