ios - UISearchBar in UISearchController slips to the right when tapped -
i have uisearchbar inside uisearchcontroller pushes right when tapped.
this how search bar looks after initial setup
below code use setup search bar inside uiviewcontroller
//set self object recieve updates of uisearchresultscontroller self.searchresultsupdater = self; //hide navigation bar during presentation of uisearchcontroller. self.hidesnavigationbarduringpresentation = yes; //set delegates uisearchbar , uisearchcontroller self.delegate = self; self.searchbar.delegate = self; //set scope bars not exist self.searchbar.scopebuttontitles = [nsarray array]; //some additional settings can configured self.context.definespresentationcontext = yes; self.dimsbackgroundduringpresentation = no; [self.searchbar sizetofit]; self.tableview.tableheaderview = self.searchbar; self.context.edgesforextendedlayout = uirectedgetop; self.searchbar.clipstobounds = yes;
once user presses on search bar, behaves this.
all of other controllers working, fine. it's 1 controller keeps acting in weird way.
the application supports both iphone , ipad, search seems working fine on iphone on ipad behaves mysteriously.
i able fix issue self. had was:
self.definespresentationcontext = false;
and remove once view dismissed
self.searchcontroller.active = false;
Comments
Post a Comment