maxep / MXSegmentedPager

Segmented pager view with Parallax header
MIT License
1.27k stars 252 forks source link

UISearchController disappears on page index other than 0 #87

Closed MadeByDouglas closed 5 years ago

MadeByDouglas commented 8 years ago

So if a viewController has a UISearch Controller and it is index 0 (the first page in MXSegmentedPager) it works fine, whether you set self.definesPresentationContext = true or false. However, if you set self.definesPresentationContext = true and its in another index the search controller disappears when you touch it. My workaround is to set self.definesPresentationContext = false which works but creates other UI changes as now the searchController affects the other controllers in the stack.

Any ideas?

MadeByDouglas commented 8 years ago

I've done more research on this and still nothing. In general, if the search is disappearing when self.definesPresentationContext = true people suggest making sure navigation controller bar is translucent or setting self.extendedLayoutIncludesOpaqueBars =true however none of these worked. Any ideas?

MadeByDouglas commented 8 years ago

video of what i mean https://vimeo.com/179602273

crossmetz commented 7 years ago

same problem here , has anyone found a solution yet ?

nikae commented 7 years ago

Any solution? I'm having very similar problem.

simonbromberg commented 6 years ago

Having same issue. If it's not on the first page the search bar disappears if definesPresentationContext is true (on the view controller). Need this because otherwise you get weird UI with the search bar floating because the search bar is presented onto the root view controller if nothing else has this flag set to true.

Tried setting it in the container pager controller but it caused the search bar to be vertically offset when activated. Plus it doesn't fix the problem with the search bar staying visible when switching pages.

Also seeing a bunch of these in the console when activating the search bar:

+[CATransaction synchronize] called within transaction

EDIT: My workaround is just to use a UISearchBar directly; Had to do a bit more setup with the cancel buttons and didBeginEditingetc but it isn't that much more work.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.