FloatingPanel
FloatingPanel copied to clipboard
Pass data from UIViewController to floatingPanel
Hello, how to send data from uiViewCOntroller to floatingPanel and displayed to label in floating panel ?
guard let bottomSheetVc = storyboard?.instantiateViewController(identifier: Constant.storyBoard.sbSheetExercise) as? BottomSheetExerciseViewController
else {
return
}
bottomSheetVc.coordinate(lat: lat, lng: lng)
func coordinate(lat: Double!, lng: Double!){
let latString: String = String(format: "%f", lat)
let lngString: String = String(format: "%f", lng)
self.lblDistanse.text = "self.lblDistanse.text = latString
}
it's return nil when display to label
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value: file
The above code is not enough to understand your situation. But If uiViewControeller is a content view controller in a panel, you can access it through uiViewController.parent.