Convert constant to Int during declaration
This commit is contained in:
parent
b75ae099d1
commit
fbdb1c9a82
|
@ -68,11 +68,11 @@ class AnimatedImage: UIImage {
|
||||||
private func prepareFrames(source: CGImageSource!) {
|
private func prepareFrames(source: CGImageSource!) {
|
||||||
imageSource = source
|
imageSource = source
|
||||||
|
|
||||||
let numberOfFrames = CGImageSourceGetCount(self.imageSource)
|
let numberOfFrames = Int(CGImageSourceGetCount(self.imageSource))
|
||||||
frameDurations.reserveCapacity(Int(numberOfFrames))
|
frameDurations.reserveCapacity(numberOfFrames)
|
||||||
frames.reserveCapacity(Int(numberOfFrames))
|
frames.reserveCapacity(numberOfFrames)
|
||||||
|
|
||||||
for index in 0..<Int(numberOfFrames) {
|
for index in 0..<numberOfFrames {
|
||||||
let frameDuration = CGImageSourceGIFFrameDuration(source, index)
|
let frameDuration = CGImageSourceGIFFrameDuration(source, index)
|
||||||
frameDurations.append(frameDuration)
|
frameDurations.append(frameDuration)
|
||||||
totalDuration += frameDuration
|
totalDuration += frameDuration
|
||||||
|
|
Loading…
Reference in New Issue