I created the following code in my code:
func SignIn(objDictionary:Dictionary<String,String>) {
I need to pass the following dictionary as a parameter in this method, which is defined below:
let objSignInDictionary:Dictionary = ["email":emailTextField.text, "password":passwordTextField.text]
How to pass this dictionary in the above method as a parameter?
It should be noted that the method is in another class, and I call the method, creating its object as follows:
let obj = Services()
SignIn is defined in the Services.swift class so I'm trying to call it as
obj.SignIn(objSignInDictionary)
but getting the following error
"String!" is not identical to "String"
Where am I mistaken and how can I fix it. I got stuck here in a couple of days.
source share