Guest User

Untitled

a guest
Jul 17th, 2018
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <key>NSAppTransportSecurity</key>
  2. <dict>
  3. <key>NSAllowsArbitraryLoads</key>
  4. <true/>
  5. </dict>
  6.  
  7. if let pictureUrl = URL(string: url) {
  8. do {
  9. let data = try Data(contentsOf: pictureUrl)
  10. img.image = UIImage(data: data)
  11. if let imageWidth = (img.image?.size.width) {
  12. let height = width / imageWidth * (img.image?.size.height)!
  13. conHeight.constant = height
  14. }
  15. }
  16. catch let error {
  17. print("Error (error.localizedDescription)")
  18. }
  19. }
Add Comment
Please, Sign In to add comment