title: How to convert a String type variable to CFString in Swift?
body: <p>I learned this from iOS tutorial, but it doesn't work</p>
  
  <pre><code>func imagePickerController(picker: UIImagePickerController!, didFinishPickingMediaWithInfo info: NSDictionary!) {
      var mediaType = info.objectForKey(UIImagePickerControllerMediaType) as String
      var originalImage, editedImage, imageToUse: UIImage
  
      // Handle a still image picked from a photo album
      if (CFStringCompare(CFStringRef(mediaType), kUTTypeImage, 0) == CFComparisonResult.CompareEqualTo) {
          editedImage = info.objectForKey(UIImagePickerControllerEditedImage) as UIImage
          originalImage = info.objectForKey(UIImagePickerControllerOriginalImage) as UIImage
  
          if (editedImage) {
              imageToUse = editedImage
          } else {
              imageToUse = originalImage
          }
  
          // Do something with imageToUse
      }
  </code></pre>
  
  <p>It constantly alerts me</p>
  
  <blockquote>
    <p>CFStringRef is not constructible with '@lvalue String'</p>
  </blockquote>
  
  <p>So I tried this:</p>
  
  <pre><code>// Handle a still image picked from a photo album
      var temp = mediaType as CFString
      if (CFStringCompare(temp, kUTTypeImage, 0) == CFComparisonResult.CompareEqualTo) {
          editedImage = info.objectForKey(UIImagePickerControllerEditedImage) as UIImage
          originalImage = info.objectForKey(UIImagePickerControllerOriginalImage) as UIImage
  </code></pre>
  
  <p>And it alerts me with</p>
  
  <blockquote>
    <p>Cannot convert the expression's type 'CFString' to type '$T1'</p>
  </blockquote>