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 search before tapping

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. after tapping search bar pushes right

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

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -