BottomSheetController
BottomSheetController copied to clipboard
completion block does nothing
completion is not called here:
func close(completion: (() -> Void)? = nil) {
sheetHeight = sheet.frame.height
closeSheet(animated: true) { _ in
self.dismiss(animated: true)
}
}
what about to rewrite it so:
var completion: (() -> Void)? = nil
func close() {
sheetHeight = sheet.frame.height
closeSheet(animated: true) { _ in
self.dismiss(animated: true, completion: self.completion)
}
}
...//add completion param to all `dissmiss` calls