4
对齐UIToolBar项目
我UIBarButtonItem创建了三个如下。它们向左对齐,我想对齐中心,因此右侧没有间隙。我看不到的align属性UIToolBar。还有另一种方法可以做到这一点吗? //create some buttons UIBarButtonItem *aboutButton = [[UIBarButtonItem alloc] initWithTitle:@"About" style:UIBarButtonItemStyleBordered target:self action:@selector(showAbout:)]; [toolbar setItems:[NSArray arrayWithObjects:settingsButton,deleteButton,aboutButton,nil]]; //Add the toolbar as a subview to the navigation controller. [self.navigationController.view addSubview:toolbar];
112
ios
cocoa-touch
uitoolbar