I am putting a label on a UIToolbar (per this tip: Adding a UILabel to a UIToolbar).
But the toolbar has a button on the left side, and so flexible spaces throw the labe
Yes we can center a toolbar item just put two flexible space in the toolbar like :
UIBarButtonItem *flexibaleSpaceBarButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
toolbar.items = [NSArray arrayWithObjects:loginButton,flexibaleSpaceBarButton,toolBarLabel,flexibaleSpaceBarButton, nil];