iphone - Position a bar button item in a toolbar -



iphone - Position a bar button item in a toolbar -

i have tool bar @ top , bottom of application , need create buttons set toolbars. ones designing application space placed between buttons on toolbar. aside manually coding in position alter buttons, there improve way accomplish through interface builder?

you can add together bar button of type uibarbuttonsystemitemflexibalespace in place want space.

uibarbuttonitem *barbutton1 = ... uibarbuttonitem *barbutton2 = ... uibarbuttonitem *flexiblespacebarbutton = [[uibarbuttonitem alloc] initwithbarbuttonsystemitem:uibarbuttonsystemitemflexiblespace target:nil action:nil]; toolbar.items = [nsarray arraywithobjects:barbutton1, flexiblespacebarbutton, barbutton2, nil];

iphone objective-c ios xcode uitoolbar

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -