Skip to content

Commit

Permalink
fix #11
Browse files Browse the repository at this point in the history
  • Loading branch information
顾海军 committed Sep 16, 2019
1 parent f56ed7a commit 0659e5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ - (void)setNn_animationProcessing:(CGFloat)nn_animationProcessing {
}

- (void)setNn_animating:(BOOL)nn_animating {

if (nn_animating == true &&
self._nn_displayLink == nil &&
self.nn_animationDuration != 0 &&
Expand Down Expand Up @@ -141,7 +140,6 @@ - (void)_nn_endLinkTick {
}

- (void)_nn_handleLinkTick {

self._nn_frameTimeCount += self._nn_displayLink.duration;
if (self._nn_frameTimeCount < self.nn_frameDuration) {
return;
Expand Down Expand Up @@ -189,4 +187,9 @@ - (UIImageView *)_nn_displayImageView {
return __nn_displayImageView;
}

- (void)dealloc {
// fix:https://github.com/amisare/NNNavigationBar/issues/11
[self _nn_endLinkTick];
}

@end
2 changes: 1 addition & 1 deletion NNNavigationBar/NNNavigationBar/Core/NNProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@interface NNProxy : NSProxy

@property (nonatomic, weak, readonly)id target;
@property (nonatomic, weak, readonly) id target;
+ (instancetype)proxyWithTarget:(id)target;
- (instancetype)initWithTarget:(id)target;

Expand Down

0 comments on commit 0659e5f

Please sign in to comment.