Code Monkey home page Code Monkey logo

Comments (6)

RuiAAPeres avatar RuiAAPeres commented on August 15, 2024

You have kPOPLayerBackgroundColor, instead of animating a view, go for its layer.

from pop.

tolnaisz avatar tolnaisz commented on August 15, 2024

That doesn't make any difference. The issue is that the basic animation's interpolation function doesn't handle CGColor values.

from pop.

RuiAAPeres avatar RuiAAPeres commented on August 15, 2024

Was looking into UIColor, instead of CGColor. Still, it would be fairly easy for you to create a pair set/get like these ones, but for what you need:

void POPUIColorGetRGBAComponents(UIColor *color, CGFloat components[])
{
  return POPCGColorGetRGBAComponents(color.CGColor, components);
}

UIColor *POPUIColorRGBACreate(const CGFloat components[])
{
  CGColorRef colorRef = POPCGColorRGBACreate(components);
  UIColor *color = [[UIColor alloc] initWithCGColor:colorRef];
  CGColorRelease(colorRef);
  return color;
}

from pop.

tolnaisz avatar tolnaisz commented on August 15, 2024

This isn't about getting/setting the color but about handling it (interpolating during animation). The kPOPValueColor type isn't handled. What you have suggested doesn't fix that. Have you tried a basic animation on a color?

from pop.

RuiAAPeres avatar RuiAAPeres commented on August 15, 2024

@tolnaisz I will have a look and get back to you.

from pop.

kimon avatar kimon commented on August 15, 2024

Good catch. We missed kPOPValueColor in POPBasicAnimationInternal.h interpolate().

from pop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.