Use the ASNetworkImageNode to load the https image ?

503 views Asked by At

I am using HTTP with ASNetworkImageNode to load the image normally and now replace it with HTTPS, my HTTPS is using a self-signed certificate.

Using ASNetworkImageNode it can not load.

I was wondering how to configure the normal loading of my photos.

1

There are 1 answers

0
swetansh kumar On

you can try the following code snippet for loading image from a url using ASNetworkImageNode

fileprivate var imageNode : ASNetworkImageNode = ASNetworkImageNode()
fileprivate var imageUrl = "your image url" // you can put your image url here.

addSubnode(imageNode) // adding the node to the parent node.

imageNode.url = URL.init(string: imageUrl!)
imageNode.contentMode = UIViewContentMode.scaleAspectFill
imageNode.backgroundColor = UIColor.white.withAlphaComponent(0.6)