Add intrinsicContentSize to image view

This commit is contained in:
Reda Lemeden 2016-09-25 11:19:09 +02:00
parent d9c474d553
commit d2e34a067d
2 changed files with 5 additions and 1 deletions

View File

@ -127,4 +127,8 @@ public class AnimatableImageView: UIImageView {
func attachDisplayLink() { func attachDisplayLink() {
displayLink.add(to: .main, forMode: RunLoopMode.commonModes) displayLink.add(to: .main, forMode: RunLoopMode.commonModes)
} }
public override var intrinsicContentSize: CGSize {
return image?.size ?? CGSize.zero
}
} }

View File

@ -19,7 +19,7 @@
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>100</string> <string>102</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
<string></string> <string></string>
</dict> </dict>