title: How to insert labels on top of images saved to .WriteToFile in PNG's Swift
body: <p>I'm trying to save a label on top of an image using .WriteToFile . </p>
  
  <p>Here's the code I'm using to save the image :</p>
  
  <pre><code>    let selectedImage: UIImage = image.image!
       let fileManager = NSFileManager.defaultManager()
       let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
       let filePathToWrite = "\(paths)/User_Profile_Image.png"
       let imageData: NSData = UIImagePNGRepresentation(selectedImage)!
       let jpgImageData = UIImageJPEGRepresentation(selectedImage, 1.0)
       fileManager.createFileAtPath(filePathToWrite, contents: jpgImageData, attributes: nil)
       // Check file saved successfully        
        let getImagePath = (paths as NSString).stringByAppendingPathComponent("User_Profile_Image.png")
       if (fileManager.fileExistsAtPath(getImagePath)) {
       print("FILE AVAILABLE");
    } else {
       print("FILE NOT AVAILABLE");
   }
  </code></pre>
  
  <p>But it only saves the image : <a href="https://i.stack.imgur.com/Guupb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Guupb.png" alt="screenshot of simulator and image saved"></a></p>
  
  <p>I'm trying to retrieve it by :</p>
  
  <pre><code> if let pdfURL = NSBundle.mainBundle().URLForResource("User_Profile_Image", withExtension: "png", subdirectory: nil, localization: nil),data = NSData(contentsOfURL: pdfURL), baseURL = pdfURL.URLByDeletingLastPathComponent  {
         let webView = UIWebView(frame: CGRectMake(20,20,self.view.frame.size.width-40,self.view.frame.size.height-40))
      print("Hello World")
      webView.loadData(data, MIMEType: "application/pdf", textEncodingName:"", baseURL: baseURL)//application/
      self.view.addSubview(webView)
    }
  </code></pre>
  
  <p>But it isn't working. Any ideas?</p>