このメソッドで rightBarButtonItem を作成します。
- (UIBarButtonItem *)customBarButtonWithSelector:(SEL)callback {
UIButton *customButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
customButton.bounds = CGRectMake(0, 0, 30.0f, 30.0f);
return [[[UIBarButtonItem alloc] initWithCustomView:customButton] autorelease];
}
実行時に、バーがボタンの外側 (中央付近) に触れたときにセレクターが起動されます。
定義された境界または許容範囲内でイベント レスポンダーを制限する方法はありますか?