当我将语言更改为阿拉伯语时,我想将UIBarButtonItem标题更改为左对齐或右对齐。
提前感谢您的帮助。
答案 0 :(得分:0)
UIToolbar * toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0,0,0,50)]; toolbar.barStyle = UIBarStyleBlack;
UIBarButtonItem *btdone = [[UIBarButtonItem alloc]initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:self action:@selector(Done)];
UIBarButtonItem *space = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
[toolbar setItems:[NSArray arrayWithObjects:space,btdone, nil]];
Space BarButton提供u空间