简体   繁体   中英

Spacing in between toolbar buttons in iphone

I have 3 buttons in a toolbar. But in the view it should look like a single button , that is there shouldn't be any space in between the 3 toolbar buttons. I cant figure out a way to do this.

Add a UISegmentedControl :

UIBarButtonItem *segmentedButton = [[UIBarButtonItem alloc] initWithCustomView:segmentedControl];
[toolbar setItems:[NSArray arrayWithObjects:segmentedButton, nil]];

Use flexible space between two button.

Thanks,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM