英文:
How to dismiss bottom sheet programatically in swift 5?
问题
我已使用底部表单。我需要在Swift 5中解散附加的底部表单。我已使用以下代码将底部表单附加到视图控制器...
let vc = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Dash_Board_Bottom_Sheet_Map") as! Dash_Board_Bottom_Sheet_Map
vc.attach(to: self)
请帮助关闭底部表单。
英文:
I have used a bottom sheet. I need to dismiss the attached bottom sheet in swift 5. I have used bellow code to the attached bottom sheet to viewController...
let vc = UIStoryboard.init(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "Dash_Board_Bottom_Sheet_Map") as! Dash_Board_Bottom_Sheet_Map
vc.attach(to: self)
Please help to dismiss bottom sheet
答案1
得分: 1
尝试这个。这对你有用。这是用于从当前视图控制器中移除表格的。
vc.detach()
英文:
Try this. This will work for you. This is for Remove the sheet from the current view controller.
vc.detach()
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论