- (void) createToolBarItemEdit{
NSString *btnStr;
self.navigationController.toolbarHidden = NO;
self.toolbarItems = nil;
UIBarButtonItem *flexibleItem = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil
action:nil];
//左のボタン
if([self isLocaleJapanese]){btnStr = @"すべて選択";}else{btnStr = @"Mark All";}
UIBarButtonItem * barButtonLeft = [[UIBarButtonItem alloc]
initWithTitle:btnStr
style:UIBarButtonItemStyleBordered
target:self
action:@selector(btnMarkAll:)
];
//中のボタン
UIBarButtonItem * barButtonCenter = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:(UIBarButtonSystemItemAdd)
target:self action:@selector(btnAdd:)
];
//右のボタン
if([self isLocaleJapanese]){btnStr = @"ゴミ箱";}else{btnStr = @"Trash";}
UIBarButtonItem * barButtonRight = [[UIBarButtonItem alloc]
initWithTitle:btnStr
style:UIBarButtonItemStyleBordered
target:self
action:@selector(btnTrash:)
];
self.toolbarItems = @[barButtonLeft ,flexibleItem ,barButtonCenter,flexibleItem ,barButtonRight];
}
0 件のコメント:
コメントを投稿