Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ios
/
yh_sdwebimage
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
DreamPiggy
2017-10-21 23:31:31 +0800
Commit
30fd6cc6ab3d0bdad682bbb952dbca930f6391eb
1 parent
04855c94
Implements -[NSImage isGIF] method to return whether current NSImage is GIF representation.
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
SDWebImage/NSImage+WebCache.m
SDWebImage/NSImage+WebCache.m
View file @
30fd6cc
...
...
@@ -23,7 +23,18 @@
}
-
(
BOOL
)
isGIF
{
return
NO
;
BOOL
isGIF
=
NO
;
for
(
NSImageRep
*
rep
in
self
.
representations
)
{
if
([
rep
isKindOfClass
:[
NSBitmapImageRep
class
]])
{
NSBitmapImageRep
*
bitmapRep
=
(
NSBitmapImageRep
*
)
rep
;
NSUInteger
frameCount
=
[[
bitmapRep
valueForProperty
:
NSImageFrameCount
]
unsignedIntegerValue
];
if
(
frameCount
>
1
)
{
isGIF
=
YES
;
break
;
}
}
}
return
isGIF
;
}
@end
...
...
Please
register
or
login
to post a comment