ios - Change title and button size for search bar -


i want change name's button seaarch bar , found examples , 1 it's works :

-(bool)searchdisplaycontrollerdidbeginsearch:(uisearchdisplaycontroller *)controller {     uibutton *cancelbutton;       uiview *topview = self.search.subviews[0];     (uiview *subview in topview.subviews) {         if ([subview iskindofclass:nsclassfromstring(@"uinavigationbutton")]) {             cancelbutton = (uibutton*)subview;         }     }     if (cancelbutton) {         [cancelbutton settitle:@"annuler" forstate:uicontrolstatenormal];         cancelbutton.titlelabel.font = [uifont systemfontofsize:12];     }     return  yes; } 

but problem : when start editing , firstly "cancel" it's showed , after annuler appears. font size 12 cancel .

this how change name of button search bar :cancel annuler

 uibarbuttonitem *searchbarbutton = [uibarbuttonitem appearancewhencontainedin:[uisearchbar class], nil];     [searchbarbutton settitle:@"annuler"]; 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -