iphoneアプリで「アプリについて」や「アプリの説明」等に使われているインフォメーションボタンがあるのですが、どのように実装するのかを以下に記します。
-----------------
//NavigationBar
// infoボタン
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeInfoLight];
[infoButton addTarget:self action:@selector(infoBtn:) forControlEvents:UIControlEventTouchUpInside];
UIBarButtonItem *leftItem = [[UIBarButtonItem alloc] initWithCustomView:infoButton];
self.navigationItem.leftBarButtonItem = leftItem;
[leftItem release];
- (IBAction)infoBtn:(id)sender
{
// ボタンタップ時の実装
}
0 件のコメント:
コメントを投稿