I have created my custom dialog in swift with xib file Now i want to use that dialog from objective c file I am able to show the dialog but i cannot able to listen click event of button
My Swift code is like
public class CustomVerificationDialog:UIView,UITextFieldDelegate
{
///Othere stuffs
var onClickRightButton : ((_ text1:String , _ text2:String ) -> Void)? = nil //This method is called when button is clicked
@IBAction func onClickBtnRight(_ sender: Any)
{
if self.onClickRightButton != nil
{
self.onClickRightButton!(editTextOne.text ?? "",editTextTwo.text ?? "")
}
}
}
Now i am able to get the click event in swift like
dialogForVerification.onClickRightButton =
{ (text1:String,text2:String) in
}
But i dont know how to listen it in objective c
CustomVerificationDialog *dialogVerification = [CustomVerificationDialog showCustomDialog];
???