diff --git a/lottie-ios/Classes/AnimatableLayers/LOTLayerView.m b/lottie-ios/Classes/AnimatableLayers/LOTLayerView.m index 20cdca69d2..8c82cdf1af 100644 --- a/lottie-ios/Classes/AnimatableLayers/LOTLayerView.m +++ b/lottie-ios/Classes/AnimatableLayers/LOTLayerView.m @@ -315,6 +315,12 @@ } } +- (NSString*)description { + NSMutableString *text = [[super description] mutableCopy]; + [text appendFormat:@" model: %@", _layerModel]; + return text; +} + #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR - (void)_setImageForAsset { diff --git a/lottie-ios/Classes/AnimatableProperties/LOTAnimatableColorValue.m b/lottie-ios/Classes/AnimatableProperties/LOTAnimatableColorValue.m index eb5684864f..51a57185bd 100644 --- a/lottie-ios/Classes/AnimatableProperties/LOTAnimatableColorValue.m +++ b/lottie-ios/Classes/AnimatableProperties/LOTAnimatableColorValue.m @@ -32,7 +32,7 @@ if ([value isKindOfClass:[NSArray class]] && [[(NSArray *)value firstObject] isKindOfClass:[NSDictionary class]] && [(NSArray *)value firstObject][@"t"]) { - //Keframes + //Keyframes [self _buildAnimationForKeyframes:value]; } else { //Single Value, no animation diff --git a/lottie-ios/Classes/Models/LOTComposition.m b/lottie-ios/Classes/Models/LOTComposition.m index 4f58a49292..8624caf9a7 100644 --- a/lottie-ios/Classes/Models/LOTComposition.m +++ b/lottie-ios/Classes/Models/LOTComposition.m @@ -53,6 +53,7 @@ } [_assetGroup finalizeInitialization]; + } @end diff --git a/lottie-ios/Classes/Models/LOTLayer.h b/lottie-ios/Classes/Models/LOTLayer.h index f45c89d48b..ce4fe25ff8 100644 --- a/lottie-ios/Classes/Models/LOTLayer.h +++ b/lottie-ios/Classes/Models/LOTLayer.h @@ -30,7 +30,7 @@ typedef enum : NSInteger { LOTMatteTypeNone, LOTMatteTypeAdd, LOTMatteTypeInvert, - LOTLayerTypeUknown + LOTMatteTypeUnknown } LOTMatteType; @interface LOTLayer : NSObject diff --git a/lottie-ios/Classes/Models/LOTLayer.m b/lottie-ios/Classes/Models/LOTLayer.m index 30731f6014..ed5e3dc389 100644 --- a/lottie-ios/Classes/Models/LOTLayer.m +++ b/lottie-ios/Classes/Models/LOTLayer.m @@ -37,7 +37,6 @@ _layerName = [jsonDictionary[@"nm"] copy]; _layerID = [jsonDictionary[@"ind"] copy]; - NSNumber *layerType = jsonDictionary[@"ty"]; _layerType = layerType.integerValue; @@ -90,7 +89,7 @@ NSDictionary *position = ks[@"p"]; if ([position[@"s"] boolValue]) { - // Seperate dimensions + // Separate dimensions _positionX = [[LOTAnimatableNumberValue alloc] initWithNumberValues:position[@"x"] frameRate:_framerate]; _positionY = [[LOTAnimatableNumberValue alloc] initWithNumberValues:position[@"y"] frameRate:_framerate]; } else { @@ -162,4 +161,11 @@ [_anchor remapPointsFromBounds:_layerBounds toBounds:CGRectMake(0, 0, 1, 1)]; } +- (NSString*)description { + NSMutableString *text = [[super description] mutableCopy]; + [text appendFormat:@" %@ id: %d pid: %d frames: %d-%d", _layerName, (int)_layerID.integerValue, (int)_parentID.integerValue, + (int)_inFrame.integerValue, (int)_outFrame.integerValue]; + return text; +} + @end diff --git a/lottie-ios/Classes/Models/LOTShapeGroup.m b/lottie-ios/Classes/Models/LOTShapeGroup.m index f91056ec96..b1fed60814 100644 --- a/lottie-ios/Classes/Models/LOTShapeGroup.m +++ b/lottie-ios/Classes/Models/LOTShapeGroup.m @@ -63,8 +63,21 @@ } else if ([type isEqualToString:@"tm"]) { LOTShapeTrimPath *trim = [[LOTShapeTrimPath alloc] initWithJSON:itemJSON frameRate:frameRate]; return trim; + } else if ([type isEqualToString:@"gs"] || [type isEqualToString:@"gf"]) { + // gs = gradient stroke + // gf = gradient fill + NSLog(@"%s: Warning: gradients are not supported", __PRETTY_FUNCTION__); + } else if ([type isEqualToString:@"sr"]) { + NSLog(@"%s: Warning: star is not supported. Convert to vector path?", __PRETTY_FUNCTION__); } + return nil; } +- (NSString*)description { + NSMutableString *text = [[super description] mutableCopy]; + [text appendFormat:@" items: %@", self.items]; + return text; +} + @end diff --git a/lottie-ios/Classes/Models/LOTShapeTransform.m b/lottie-ios/Classes/Models/LOTShapeTransform.m index 37f678be80..3d842a57e7 100644 --- a/lottie-ios/Classes/Models/LOTShapeTransform.m +++ b/lottie-ios/Classes/Models/LOTShapeTransform.m @@ -66,6 +66,18 @@ _opacity = [[LOTAnimatableNumberValue alloc] initWithNumberValues:opacity frameRate:frameRate]; [_opacity remapValuesFromMin:@0 fromMax:@100 toMin:@0 toMax:@1]; } + + NSString *name = jsonDictionary[@"nm"]; + + NSDictionary *skew = jsonDictionary[@"sk"]; + BOOL hasSkew = (skew && [skew[@"k"] isEqual:@0] == NO); + NSDictionary *skewAxis = jsonDictionary[@"sa"]; + BOOL hasSkewAxis = (skewAxis && [skewAxis[@"k"] isEqual:@0] == NO); + + if (hasSkew || hasSkewAxis) { + NSLog(@"%s: Warning: skew is not supported: %@", __PRETTY_FUNCTION__, name); + } + } - (NSString *)description {