我需要在ToolBar的中心添加一个按钮.我已成功将按钮添加到工具栏部件.我的问题如下;
1.)我需要把这个按钮放在中心位置.它应该位于工具栏的中心
2.)显示刷新按钮图像后,我需要有一个文本.
toolBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0 , 320 , 60)];
NSMutableArray* button = [[NSMutableArray alloc] initWithCapacity:1];
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(refreshButtonAction:)];
[button addObject:barButton];
[toolBar setItems:button animated:NO];
[self.view addSubview:toolBar];
Run Code Online (Sandbox Code Playgroud)