請試試這個,我覺得這可能會幫助你
// image for my back button
UIImage *backButtonImage= [UIImage imageNamed:@"Back.png"];
UIButton *leftBarButton = [UIButton buttonWithType: UIButtonTypeCustom];
// Setting the image for the back button
[leftBarButton setBackgroundImage: backButtonImage forState:UIControlStateNormal];
[leftBarButton addTarget: self action:@selector(backToMenu:) forControlEvents:UIControlEventTouchUpInside];
// setting the frame for the back button
leftBarButton.frame = CGRectMake(0, 0, 65, 32);
// setting the custom button to navigationbars back button
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView: leftBarButton];
謝謝,可能需要使用backitem或topitem。然而,仍然無法到達框架來修改它或重新定位它 – inforeqd 2012-04-20 06:04:49