Answer the question
In order to leave comments, you need to log in
Passing UIImage from struct to ViewController?
Greetings guys
Tell me how to correctly pass UIImage / or Data from the structure to the ViewController
The logic is as follows
1. In the ViewController, the method from the structure catches the url
func showAll() {
GetManager.showContent(pasteboard: link)
}
Alamofire.request(postURL, method: .post, parameters: parameters, encoding: URLEncoding.default).responseJSON { response in
switch response.result { ...
}
}
static func base64toImage(base64String: String?) -> UIImage{
}
static func base64toVideo(base64String: String?) {
}
Answer the question
In order to leave comments, you need to log in
Do you have a data structure model? Injected into ViewController?
Create a weak variable in the structure that will contain a reference to the ViewController and call its methods.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question