{"id":16685376,"url":"https://github.com/andrewbennet/modaldismississueexample","last_synced_at":"2025-03-13T14:41:19.048Z","repository":{"id":81513434,"uuid":"103775953","full_name":"AndrewBennet/ModalDismissIssueExample","owner":"AndrewBennet","description":"A demo of an issue in iOS 11 when dismissing modally presented navigation controllers","archived":false,"fork":false,"pushed_at":"2017-09-16T21:44:05.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T10:23:19.254Z","etag":null,"topics":["bug","ios11","swift","swift-4","uikit","xcode9"],"latest_commit_sha":null,"homepage":"https://stackoverflow.com/q/46228862/5513562","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndrewBennet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-16T18:47:50.000Z","updated_at":"2017-09-16T18:55:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e7eb228-fbe4-4db0-847a-8e1558afce97","html_url":"https://github.com/AndrewBennet/ModalDismissIssueExample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewBennet%2FModalDismissIssueExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewBennet%2FModalDismissIssueExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewBennet%2FModalDismissIssueExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndrewBennet%2FModalDismissIssueExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndrewBennet","download_url":"https://codeload.github.com/AndrewBennet/ModalDismissIssueExample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243428422,"owners_count":20289315,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bug","ios11","swift","swift-4","uikit","xcode9"],"created_at":"2024-10-12T14:47:06.696Z","updated_at":"2025-03-13T14:41:19.027Z","avatar_url":"https://github.com/AndrewBennet.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Modal Dismiss Issue Example\nA demo of an issue in iOS 11 when dismissing modally presented navigation controllers\n\nThis project supplements [this stack overflow question](https://stackoverflow.com/q/46228862/5513562).\n\nThere are two ways of dismissing a modally presented navigation controller, from the final view controller in the navigation flow:\n \n- Ask the presenting VC to dismiss it: `self.presentingViewController!.dismiss(animated: true)`\n- Call dismiss on the navigation controller: `self.navigationController!.dismiss(animated: true)`\n\nThe second is allowed since the [docs](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621505-dismiss) say: \n\n\u003e If you call this method on the presented view controller itself, UIKit asks the presenting view controller to handle the dismissal.\n        \nThey both have problems!\n        \nType 1 produces a visual artifact: a duplicate VS is seen under the dismissed one\nType 2 needs to be called twice in order to work! Presumably, the first call is dismissing the search controller?...\n\n-------\n\nResolved: Adding `searchController.isActive = false` to `viewWillDisappear` resolves the issue\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewbennet%2Fmodaldismississueexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewbennet%2Fmodaldismississueexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewbennet%2Fmodaldismississueexample/lists"}