Swift error in passing parameters

Asked

Viewed 49 times

1

func imageUploadRequest(param:[String: String] ,myImageView: UIImage)

I need to call the function imageUploadRequest passing 2 parameters, the first being a string array and the second an image. How could I do this? 'Cause you’re making a mistake passing the parameters?

var up = UploadImageView()
            var request: UploadImageView = UploadImageView()
            request.imageUploadRequest(param, myImageView: self.imageProfile)
  • 1

    String or Dictionary array? if it is only string array uses only param:[String]. What error is appearing in Logs?

1 answer

0

In case, you must pass the parameters in the following way:

func imageUploadRequest(param:Array<String>,myImageView:UIImage)

Taking for position that in Swift 2.0 is used the specification of the array parameter through the "< >".

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.