アプリに情報ボタンを作成しました。viewdidload のコードは次のようになります。
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(showInfo:)
forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *rightBarButtonItem = [[UIBarButtonItem alloc]
initWithCustomView:infoButton];
self.navigationItem.rightBarButtonItem = rightBarButtonItem;
しかし、この情報ボタンに単純なテキストビューを追加するにはどうすればよいでしょうか?それを押すとテキストが表示されます。
Apple の NavBar サンプル コードを調べてみましたが、うまく動作しませんでした。
誰でも私を助けることができますか?
編集:
他の提案はありますか?