Skip to content

Commit

Permalink
Fix warnings in Contentful extension
Browse files Browse the repository at this point in the history
  • Loading branch information
neonichu committed Jan 7, 2016
1 parent 7824886 commit 93e0bdc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions Code/CCBufferedImageView+Contentful.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension UIImageView {
fatalError("should never be called")
}

func cda_setImageWithAsset(asset: CDAAsset!, URL: NSURL!, size: CGSize, placeholderImage: UIImage!) {
func cda_setImageWithAsset(asset: CDAAsset, URL: NSURL!, size: CGSize, placeholderImage: UIImage!) {
fatalError("should never be called")
}
}
Expand All @@ -34,11 +34,8 @@ extension CCBufferedImageView {
}
}

public override func cda_setImageWithAsset(asset: CDAAsset!, size: CGSize, placeholderImage: UIImage!) {
if let asset = asset {
let URL = asset.imageURLWithSize(size, quality: 0.75, format: CDAImageFormat.JPEG, fit: CDAFitType.Default, focus: nil, radius: CDARadiusNone, background: nil, progressive: true)

cda_setImageWithAsset(asset, URL: URL, size: size, placeholderImage: placeholderImage)
}
public override func cda_setImageWithAsset(asset: CDAAsset, size: CGSize, placeholderImage: UIImage!) {
let URL = asset.imageURLWithSize(size, quality: 0.75, format: CDAImageFormat.JPEG, fit: CDAFitType.Default, focus: nil, radius: CDARadiusNone, background: nil, progressive: true)
cda_setImageWithAsset(asset, URL: URL, size: size, placeholderImage: placeholderImage)
}
}

0 comments on commit 93e0bdc

Please sign in to comment.