Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
PNChart
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Emma Makinson
2015-12-18 16:37:17 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1d3158c459ee149c407688aa23f5b59c30e62b09
1d3158c4
1 parent
d1fd080c
Makes line chart fade animation optional
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
PNChart/PNBar.m
PNChart/PNLineChart.m
PNChart/PNBar.m
View file @
1d3158c
...
...
@@ -232,17 +232,14 @@
-
(
CABasicAnimation
*
)
fadeAnimation
{
CABasicAnimation
*
fadeAnimation
=
nil
;
if
(
self
.
displayAnimated
)
{
CABasicAnimation
*
fadeAnimation
=
[
CABasicAnimation
animationWithKeyPath
:
@"opacity"
];
fadeAnimation
=
[
CABasicAnimation
animationWithKeyPath
:
@"opacity"
];
fadeAnimation
.
fromValue
=
[
NSNumber
numberWithFloat
:
0
.
0
];
fadeAnimation
.
toValue
=
[
NSNumber
numberWithFloat
:
1
.
0
];
fadeAnimation
.
duration
=
2
.
0
;
return
fadeAnimation
;
}
else
{
return
nil
;
}
return
fadeAnimation
;
}
-
(
void
)
addAnimationIfNeededWithProgressLine
:
(
UIBezierPath
*
)
progressline
...
...
PNChart/PNLineChart.m
View file @
1d3158c
...
...
@@ -1041,11 +1041,13 @@
-
(
CABasicAnimation
*
)
fadeAnimation
{
CABasicAnimation
*
fadeAnimation
=
[
CABasicAnimation
animationWithKeyPath
:
@"opacity"
];
fadeAnimation
.
fromValue
=
[
NSNumber
numberWithFloat
:
0
.
0
];
fadeAnimation
.
toValue
=
[
NSNumber
numberWithFloat
:
1
.
0
];
fadeAnimation
.
duration
=
2
.
0
;
CABasicAnimation
*
fadeAnimation
=
nil
;
if
(
self
.
displayAnimated
)
{
fadeAnimation
=
[
CABasicAnimation
animationWithKeyPath
:
@"opacity"
];
fadeAnimation
.
fromValue
=
[
NSNumber
numberWithFloat
:
0
.
0
];
fadeAnimation
.
toValue
=
[
NSNumber
numberWithFloat
:
1
.
0
];
fadeAnimation
.
duration
=
2
.
0
;
}
return
fadeAnimation
;
}
...
...
Please
register
or
login
to post a comment