dekatotoro / dekatotoro/SlideMenuControllerSwift

UISearchController disappearing when I open the slideMenu

Open
#186 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
3.4k
Forks
742
PR merge metrics
No merged PRs in 30d

Description

I have a UISearchController added to my UIViewController as a subview of a view that is declared in Storyboard. Almost everything is working fine... until I open the side menu while the UISearchController is active. In this case the UISearhController disappears and it won't show until I add it as subview again (the UISearchController is declared as a property of my class)

A few screenshots attached:

Static screen so you can see actual layout with side menu closed
![img_2539](https://cloud.githubusercontent.com/assets/5590195/16497968/e664fd02-3ecf-11e6-96d2-de4a1228fa64.PNG)

If search controller is not active and side menu is open, everything is fine
![img_2540](https://cloud.githubusercontent.com/assets/5590195/16497967/e6646ffe-3ecf-11e6-81ce-e7f5e134a615.PNG)

Now let's start searching
![img_2541](https://cloud.githubusercontent.com/assets/5590195/16497965/e65df69c-3ecf-11e6-9bc3-569b405290a7.PNG)

**Here is the problem.** If I open side menu, search menu disappears for good. It doesn't matter if it's via gesture or via slideMenuController()?.openLeft() call.
![img_2543](https://cloud.githubusercontent.com/assets/5590195/16497964/e65d048a-3ecf-11e6-9d6b-6ebc53e31487.PNG)

If I set self.definesPresentationContext = false, this happens. It won't disappear anymore, but it obviously not what I want.
![img_2544](https://cloud.githubusercontent.com/assets/5590195/16497966/e6603fd8-3ecf-11e6-8732-e11f84016e10.PNG)

Can I anybody give me some input? Is there anything I can do with the UISearchController or SideMenuController to solve this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the interaction between UISearchController and the slide menu, using both the gesture and slideMenuController()?.openLeft() entry points. Compare the behavior with definesPresentationContext enabled and disabled, then inspect the view-controller presentation context involved. Done means the active search controller remains visible after opening the side menu without requiring it to be added again.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.