ios - How to have two different colors for two UIBarButtonItem in navigation bar at the same time? -


are there standard methods having 2 different colors 2 uibarbuttonitems on navigationbar @ same time?

this achieve using custom uibutton, e.g.:

uibutton *confirmbtn = [[uibutton alloc] init]; confirmbtn.titlelabel.font =[uifont boldsystemfontofsize:16.0f]; [confirmbtn settitle:@"confirm" forstate:uicontrolstatenormal]; confirmbtn.titleedgeinsets = uiedgeinsetsmake(0, 0, 0, -40); [confirmbtn settitlecolor:[colorsetter colorwithhexstring:@"ffd420"] forstate:uicontrolstatenormal]; confirmbtn.frame = cgrectmake(0, 0, 80, 50); [confirmbtn addtarget:self action:@selector(doneclicked:) forcontrolevents:uicontroleventtouchupinside];  uibarbuttonitem *confirmbtnbaritem = [[uibarbuttonitem alloc] initwithcustomview:confirmbtn]; self.navigationitem.rightbarbuttonitem = confirmbtnbaritem; 


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -