Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持iOS 更高版本 #168

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Demo/YYImageDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
A11E94612514C2C500D4033C /* YYImage.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = YYImage.podspec; path = ../YYImage.podspec; sourceTree = "<group>"; };
A11E94622514C2CB00D4033C /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
D91A602C1F057230008CD5D3 /* YYImageDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YYImageDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
D91A602F1F057230008CD5D3 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = YYImageDemo/AppDelegate.h; sourceTree = "<group>"; };
D91A60301F057230008CD5D3 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = YYImageDemo/AppDelegate.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -171,6 +173,8 @@
D97F40891F0573DA00DFD481 /* YYImage */ = {
isa = PBXGroup;
children = (
A11E94622514C2CB00D4033C /* README.md */,
A11E94612514C2C500D4033C /* YYImage.podspec */,
D97F408A1F0573DA00DFD481 /* YYAnimatedImageView.h */,
D97F408B1F0573DA00DFD481 /* YYAnimatedImageView.m */,
D97F408C1F0573DA00DFD481 /* YYFrameImage.h */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Image framework for iOS to display/encode/decode animated WebP, APNG, GIF, and m

Features
==============
- 最近更新修复图片加载不出来,兼容iOS 14
- Display/encode/decode animated image with these types:<br/>&nbsp;&nbsp;&nbsp;&nbsp;WebP, APNG, GIF.
- Display/encode/decode still image with these types:<br/>&nbsp;&nbsp;&nbsp;&nbsp;WebP, PNG, GIF, JPEG, JP2, TIFF, BMP, ICO, ICNS.
- Baseline/progressive/interlaced image decode with these types:<br/>&nbsp;&nbsp;&nbsp;&nbsp;PNG, GIF, JPEG, BMP.
Expand Down Expand Up @@ -138,7 +139,7 @@ Installation
### CocoaPods

1. Update cocoapods to the latest version.
2. Add `pod 'YYImage'` to your Podfile.
2. Add `pod 'YYImage', :git => 'https://github.com/QiuYeHong90/YYImage.git'` to your Podfile.
3. Run `pod install` or `pod update`.
4. Import \<YYImage/YYImage.h\>.
5. Notice: it doesn't include WebP subspec by default, if you want to support WebP format, you may add `pod 'YYImage/WebP'` to your Podfile.
Expand Down
2 changes: 1 addition & 1 deletion YYImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Pod::Spec.new do |s|
s.homepage = 'https://github.com/ibireme/YYImage'
s.platform = :ios, '6.0'
s.ios.deployment_target = '6.0'
s.source = { :git => 'https://github.com/ibireme/YYImage.git', :tag => s.version.to_s }
s.source = { :git => 'https://github.com/QiuYeHong90/YYImage.git', :tag => s.version.to_s }

s.requires_arc = true
s.default_subspec = 'Core'
Expand Down
9 changes: 7 additions & 2 deletions YYImage/YYAnimatedImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -526,8 +526,13 @@ - (void)step:(CADisplayLink *)link {
}

- (void)displayLayer:(CALayer *)layer {
if (_curFrame) {
layer.contents = (__bridge id)_curFrame.CGImage;
UIImage *currentFrame = _curFrame;
if (!currentFrame) {
currentFrame = self.image;
}
if (currentFrame) {
layer.contentsScale = currentFrame.scale;
layer.contents = (__bridge id)currentFrame.CGImage;
}
}

Expand Down