Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <key>NSAppTransportSecurity</key>
- <dict>
- <key>NSAllowsArbitraryLoads</key>
- <true/>
- </dict>
- if let pictureUrl = URL(string: url) {
- do {
- let data = try Data(contentsOf: pictureUrl)
- img.image = UIImage(data: data)
- if let imageWidth = (img.image?.size.width) {
- let height = width / imageWidth * (img.image?.size.height)!
- conHeight.constant = height
- }
- }
- catch let error {
- print("Error (error.localizedDescription)")
- }
- }
Add Comment
Please, Sign In to add comment