I'm trying to transfer data using protocol from this xib file called:OverlayPopUpView and it's of type UIViewController to another ViewController but I can't access access xib identifier in The another ViewController to transfer data like bellow :
if let OverlayPopUpVC = UIStoryboard(name: "Workstation", bundle:nil).instantiateViewController(identifier: "OverlayPopUpView") as? OverlayPopUpVc {
OverlayPopUpVC.overlayPopUpDelegate = self
}
but it gives me error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Storyboard (<UIStoryboard: 0x6000029bb660>) doesn't contain a view controller with identifier 'OverlayPopUpView''
I guess the problem from here I can't access identifier of the xib file so I did it like that: accessibilityIdentifier of the nib file I wrote the key: accessibilityIdentifier of type string and wrote the value which I mentioned in the code above "OverlayPopUpView"