iphone - How to set image for UIBarButtonItem Flexible space - IOS -


have @ image...

enter image description here

i want design toolbar this, each uibarbuttonitem should separated thin line. have inserted flexible space button in between each uibarbuttonitem (that helps me in aligning uibarbuttonitem while orientation changes), if set image that, no more acting flexible button, changes normal uibarbutton.

so need flexible space button image.. idea how it. (or) how design uitoolbar above... helps appreciated. thanx

to set background image uibarbuttonitem

uiimage *faceimage = [uiimage imagenamed:@"facebook.png"]; uibutton *face = [uibutton buttonwithtype:uibuttontypecustom]; face.bounds = cgrectmake( 0, 0, faceimage.size.width, faceimage.size.height ); [face setimage:faceimage forstate:uicontrolstatenormal]; uibarbuttonitem *facebtn = [[uibarbuttonitem alloc] initwithcustomview:face]; 

Comments