私は持っていUINavigationController
ます。次に、ナビゲーションバーボタンを表示する必要があります。次のコードを使用しました:
UINavigationController *nav=[[UINavigationController alloc] init];
[self.view addSubview:nav.view];
UIImage *info_iphone=[UIImage imageNamed:@"button.png"];
UIButton *infobtn=[[UIButton alloc]initWithFrame:CGRectMake(0, 0, 48, 30)];
[infobtn setBackgroundImage:info_iphone forState:UIControlStateNormal];
[infobtn addTarget:self action:@selector(show_info:) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem=[[UIBarButtonItem alloc]initWithCustomView:infobtn];