title: Why won't GIF slow down with kCGImagePropertyGIFDelayTime
body: <p>Using <a href="https://stackoverflow.com/questions/14915138/create-and-and-export-an-animated-gif-via-ios">Rob Mayoff's answer to create GIF</a>, I've adapted his code to the following in Swift.</p>
  
  <pre><code>let kFrameCount:Int = 6
  
  let frames:NSNumber = NSNumber(float: 20000.0) //No matter what number I place here...GIF runs at same speed
  
  let fileProperties = [kCGImagePropertyGIFLoopCount as String: 0]
  let frameProperties = [kCGImagePropertyGIFDelayTime as String: frames]
  
  let documentsUrl =  NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask)[0] as! NSURL
  let fileURL = documentsUrl.URLByAppendingPathComponent("animated.gif")
  
  var destination: CGImageDestination = CGImageDestinationCreateWithURL(fileURL, kUTTypeGIF, kFrameCount, nil)
  var destination2: Void = CGImageDestinationSetProperties(destination, fileProperties)
  
  for i in 0..&lt;kFrameCount {
     CGImageDestinationAddImage(destination, imagessss[i].CGImage, frameProperties)
  }
  
  if (!CGImageDestinationFinalize(destination)) {
          println("fail")
  }
  
  println(fileURL)
  
  let activityVC: UIActivityViewController = UIActivityViewController(activityItems: [fileURL], applicationActivities: nil)
  self.presentViewController(activityVC, animated: true, completion: nil)
  </code></pre>
  
  <p>This creates the GIF. But no matter what amount I place as the <code>float</code>, 20000.0 or 0.01, the GIF runs at the same <strong>DelayTime</strong>. Also if I change the value in <code>fileProperties</code> from 0 to any other number, the GIF still does a continuous loop.</p>
  
  <p>I feel the error lies in the line </p>
  
  <pre><code>var destination2: Void = CGImageDestinationSetProperties(destination, fileProperties)
  </code></pre>
  
  <p>or my declaration of <code>fileProperties</code> and <code>frameProperties</code></p>
  
  <p>Does Anyone know why my <code>fileProperties</code> and <code>frameProperties</code> are not effecting the GIF?</p>
  
  <p>P.S. I can effectively slowdown the gif by increasing the frames and lacing the <code>imagessss</code> array with duplicate images, But this isn't ideal.</p>