Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: devinross/tapkulibrary
base: d682038685
...
head fork: devinross/tapkulibrary
compare: cf0a1df48d
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
12 src/TapkuLibrary/TKAlertViewController.h
@@ -54,4 +54,16 @@
/** Hide the alert */
- (void) hide;
+/**
+ Overwrite this function to implement your own presentation animation.
+ @transitionContext The transition context.
+ */
+- (void) showAlertView:(id<UIViewControllerContextTransitioning>)transitionContext;
+
+/**
+ Overwrite this function to implement your own dismissal animation.
+ @transitionContext The transition context.
+ */
+- (void) hideAlertView:(id<UIViewControllerContextTransitioning>)transitionContext;
+
@end
View
22 src/TapkuLibrary/TKShimmerLabel.m
@@ -50,10 +50,19 @@ - (id) initWithFrame:(CGRect)frame{
self.textHighlightLayer.endPoint = CGPointMake(1.0, 0);
self.layer.mask = self.textHighlightLayer;
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(applicationDidBecomeActive:)
+ name:UIApplicationDidBecomeActiveNotification object:nil];
+
return self;
}
+- (void) dealloc{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
-- (void) willMoveToWindow:(UIWindow *)newWindow{
+- (void) _startShimmerAnimation{
+
+ if(!self.superview) return;
[self.textHighlightLayer removeAllAnimations];
CGFloat x = self.textHighlightLayer.frame.size.width/2.0f;
@@ -63,9 +72,16 @@ - (void) willMoveToWindow:(UIWindow *)newWindow{
animation.fromValue = @(-x + self.frame.size.width);
animation.duration = 4.0f;
[self.textHighlightLayer addAnimation:animation forKey:@"position.x"];
-
}
+- (void) applicationDidBecomeActive:(id)sender{
+
+ [self _startShimmerAnimation];
+
+}
+- (void) willMoveToWindow:(UIWindow *)newWindow{
+ [self _startShimmerAnimation];
+}
-@end
+@end

No commit comments for this range

Something went wrong with that request. Please try again.