Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
iphone/tipop.xcodeproj/xcuserdata/*.xcuserdatad
iphone/tipop.xcodeproj/project.xcworkspace/xcuserdata/*.xcuserdatad
/.DS_Store
Binary file removed build/guy.mcdooooo.tipop-iphone-1.0.1.zip
Binary file not shown.
Binary file removed build/guy.mcdooooo.tipop-iphone-1.0.2.zip
Binary file not shown.
Binary file removed build/guy.mcdooooo.tipop-iphone-1.0.3.zip
Binary file not shown.
Binary file removed build/guy.mcdooooo.tipop-iphone-1.0.4.zip
Binary file not shown.
Binary file removed build/guy.mcdooooo.tipop-iphone-1.0.5.zip
Binary file not shown.
Binary file added iphone/.DS_Store
Binary file not shown.
45 changes: 29 additions & 16 deletions iphone/Classes/FBPOPAnimator.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import "FBPOPAnimator.h"

@class TiUILabel, TiUIScrollView;

@implementation FBPOPAnimator

#define ERR_DIMENSION -100000000.f
Expand Down Expand Up @@ -216,12 +218,14 @@ -(void)basicAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
[proxy.view.layer pop_addAnimation:animBackgroundColor forKey:@"BasicAnimationBackgroundColor"];

}

Class TiUILabelClass = NSClassFromString(@"TiUILabel");

if ( [proxy.view isKindOfClass:[TiUILabel class]] && nil != color ) {
if ( [proxy.view isKindOfClass:TiUILabelClass] && nil != color ) {

setAnimationMask(basicMask, TIPOPCOLOR);

[[(TiUILabel *)proxy.view label] pop_removeAnimationForKey:@"BasicAnimationLabelTextColor"];
[[(id)proxy.view valueForKey:@"label"] pop_removeAnimationForKey:@"BasicAnimationLabelTextColor"];

POPBasicAnimation *animColor = [POPBasicAnimation animationWithPropertyNamed:kPOPLabelTextColor];
animColor.toValue = color.color;
Expand All @@ -234,7 +238,7 @@ -(void)basicAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
};
BASIC_POP_ATTR( animColor );

[[(TiUILabel *)proxy.view label] pop_addAnimation:animColor forKey:@"BasicAnimationLabelTextColor"];
[[(id)proxy.view valueForKey:@"label"] pop_addAnimation:animColor forKey:@"BasicAnimationLabelTextColor"];
}

if ( nil != tintColor ) {
Expand Down Expand Up @@ -858,7 +862,9 @@ -(void)basicAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary

}

if ( [proxy.view isKindOfClass:[TiUIScrollView class]] ) {
Class TiUIScrollViewClass = NSClassFromString(@"TiUIScrollView");

if ( [proxy.view isKindOfClass:TiUIScrollViewClass] ) {

if ( nil != [properties objectForKey:@"scrollViewContentOffset"] ) {

Expand All @@ -876,7 +882,7 @@ -(void)basicAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
float y = ( nil != [scrollViewContentOffset objectForKey:@"y"] ) ?
[[scrollViewContentOffset objectForKey:@"y"] floatValue] : 0.f;

[[(TiUIScrollView *)proxy.view scrollView] pop_removeAnimationForKey:@"BasicAnimationScrollViewContentOffset"];
[[(id)proxy.view scrollView] pop_removeAnimationForKey:@"BasicAnimationScrollViewContentOffset"];
POPBasicAnimation *animScrollViewContentOffset = [POPBasicAnimation animationWithPropertyNamed:kPOPScrollViewContentOffset];
animScrollViewContentOffset.toValue = [NSValue valueWithCGPoint:CGPointMake(x, y)];
animScrollViewContentOffset.completionBlock = ^(POPAnimation *anim, BOOL completed) {
Expand All @@ -887,7 +893,7 @@ -(void)basicAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
};

BASIC_POP_ATTR( animScrollViewContentOffset );
[[(TiUIScrollView *)proxy.view scrollView] pop_addAnimation:animScrollViewContentOffset forKey:@"BasicAnimationScrollViewContentOffset"];
[[(id)proxy.view scrollView] pop_addAnimation:animScrollViewContentOffset forKey:@"BasicAnimationScrollViewContentOffset"];

}

Expand Down Expand Up @@ -1131,11 +1137,13 @@ -(void)springAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary

}

if ( [proxy.view isKindOfClass:[TiUILabel class]] && nil != color ) {
Class TiUILabelClass = NSClassFromString(@"TiUILabel");

if ( [proxy.view isKindOfClass:TiUILabelClass] && nil != color ) {

setAnimationMask(springMask, TIPOPCOLOR);

[[(TiUILabel *)proxy.view label] pop_removeAnimationForKey:@"SpringAnimationLabelTextColor"];
[[(id)proxy.view valueForKey:@"label"] pop_removeAnimationForKey:@"SpringAnimationLabelTextColor"];

POPSpringAnimation *animColor = [POPSpringAnimation animationWithPropertyNamed:kPOPLabelTextColor];
animColor.toValue = color.color;
Expand All @@ -1148,7 +1156,7 @@ -(void)springAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
};
SPRING_POP_ATTR( animColor );

[[(TiUILabel *)proxy.view label] pop_addAnimation:animColor forKey:@"SpringAnimationLabelTextColor"];
[[(id)proxy.view valueForKey:@"label"] pop_addAnimation:animColor forKey:@"SpringAnimationLabelTextColor"];

}

Expand Down Expand Up @@ -1783,8 +1791,10 @@ -(void)springAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
}

}

Class TiUIScrollViewClass = NSClassFromString(@"TiUIScrollView");

if ( [proxy.view isKindOfClass:[TiUIScrollView class]] ) {
if ( [proxy.view isKindOfClass:TiUIScrollViewClass] ) {

if ( nil != [properties objectForKey:@"scrollViewContentOffset"] ) {

Expand All @@ -1798,7 +1808,7 @@ -(void)springAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
float y = ( nil != [scrollViewContentOffset objectForKey:@"y"] ) ?
[[scrollViewContentOffset objectForKey:@"y"] floatValue] : 0.f;

[[(TiUIScrollView *)proxy.view scrollView] pop_removeAnimationForKey:@"SpringAnimationScrollViewContentOffset"];
[[(id)proxy.view scrollView] pop_removeAnimationForKey:@"SpringAnimationScrollViewContentOffset"];

POPSpringAnimation *animScrollViewContentOffset = [POPSpringAnimation animationWithPropertyNamed:kPOPScrollViewContentOffset];
animScrollViewContentOffset.toValue = [NSValue valueWithCGPoint:CGPointMake(x, y)];
Expand All @@ -1810,7 +1820,7 @@ -(void)springAnimationWithProxy:(TiViewProxy *)proxy andProperties:(NSDictionary
};

SPRING_POP_ATTR( animScrollViewContentOffset );
[[(TiUIScrollView *)proxy.view scrollView] pop_addAnimation:animScrollViewContentOffset forKey:@"SpringAnimationScrollViewContentOffset"];
[[(id)proxy.view scrollView] pop_addAnimation:animScrollViewContentOffset forKey:@"SpringAnimationScrollViewContentOffset"];

}

Expand Down Expand Up @@ -2608,13 +2618,16 @@ -(void)clearAllAnimations:(TiViewProxy *)proxy {
[proxy.view.layer pop_removeAllAnimations];
[proxy.view.shadowLayer pop_removeAllAnimations];

if ( [proxy.view isKindOfClass:[TiUILabel class]] ) {
Class TiUILabelClass = NSClassFromString(@"TiUILabel");
Class TiUIScrollViewClass = NSClassFromString(@"TiUIScrollView");

if ( [proxy.view isKindOfClass:TiUILabelClass] ) {

[[(TiUILabel *)proxy.view label] pop_removeAllAnimations];
[[(id)proxy.view valueForKey:@"label"] pop_removeAllAnimations];

} else if ( [proxy.view isKindOfClass:[TiUIScrollView class]] ) {
} else if ( [proxy.view isKindOfClass:TiUIScrollViewClass] ) {

[[(TiUIScrollView *)proxy.view scrollView] pop_removeAllAnimations];
[[(id)proxy.view scrollView] pop_removeAllAnimations];

}

Expand Down
2 changes: 1 addition & 1 deletion iphone/Classes/GuyMcdoooooTipopModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Copyright (c) 2014 Do Lin. All rights reserved.
*/

#import "TiModule.h"
#import <TitaniumKit/TitaniumKit.h>
#import "FBPOPAnimator.h"

@interface GuyMcdoooooTipopModule : TiModule {
Expand Down
4 changes: 1 addition & 3 deletions iphone/Classes/GuyMcdoooooTipopModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
*/

#import "GuyMcdoooooTipopModule.h"
#import "TiBase.h"
#import "TiHost.h"
#import "TiUtils.h"
#import <TitaniumKit/TitaniumKit.h>

@implementation GuyMcdoooooTipopModule

Expand Down
18 changes: 8 additions & 10 deletions iphone/Classes/GuyMcdoooooTipopModuleAssets.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,18 @@

@implementation GuyMcdoooooTipopModuleAssets

- (NSData*) moduleAsset
- (NSData *)moduleAsset
{
//##TI_AUTOGEN_BEGIN asset
//Compiler generates code for asset here
return nil; // DEFAULT BEHAVIOR
//##TI_AUTOGEN_END asset


return nil;
}

- (NSData*) resolveModuleAsset:(NSString*)path
- (NSData *)resolveModuleAsset:(NSString *)path
{
//##TI_AUTOGEN_BEGIN resolve_asset
//Compiler generates code for asset resolution here
return nil; // DEFAULT BEHAVIOR
//##TI_AUTOGEN_END resolve_asset


return nil;
}

@end
111 changes: 0 additions & 111 deletions iphone/README

This file was deleted.

Loading