GithubHelp home page GithubHelp logo

Comments (6)

PlutoniumDev avatar PlutoniumDev commented on June 2, 2024

Has this problem been resolved yet? Still can't figure it out!

from maconfirmbutton.

zubko avatar zubko commented on June 2, 2024

I'm also using MAConfirmButton. I think that's happening because UIColor has a method now, which wasn't present when the UIColor-Expanded category was created.
You can check where this method is used in MAConfirmButton code. If it's not used anywhere (my bet) you can freely remove it. If it is used somewhere, remove it with caution after a check that the method in UIColor does the same job.

from maconfirmbutton.

PlutoniumDev avatar PlutoniumDev commented on June 2, 2024

But when I comment out the method, in the UIColor-Extended class, the buttons tint color turns red from yellow. Here is the method that's causing all the trouble:

+ (UIColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha {
    // Convert hsb to rgb
    CGFloat r,g,b;
    [self hue:hue saturation:saturation brightness:brightness toRed:&r green:&g blue:&b];

    // Create a color with rgb
    return [self colorWithRed:r green:g blue:b alpha:alpha];
}

When I'm creating the MAConfirmButton I use the colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha;

In the method causing the trouble you convert it to be the above method. Any thoughts on this?

from maconfirmbutton.

zubko avatar zubko commented on June 2, 2024

If you are on a tight schedule I suggest you just to rename that conflicting method, and also rename all occurrences of it in MAConfirmButton code.

I don't use -setTint: in MAConfirmButton that's why I haven't that issue you are experiencing.

Looking deeper you may notice that this UIColor-Extended category provides it own getters for hue, saturation and brightness which MAConfirmButton also uses. So I think the problem is that MAConfirmButton must use HSB getters from UIColor also if this is possible, or UIColor-Extended method names must be changed to not conflict with iOS API.

from maconfirmbutton.

maddox avatar maddox commented on June 2, 2024

This is in fact a huge bug on iOS 6. Confirmed.

PR forthcoming.

from maconfirmbutton.

maddox avatar maddox commented on June 2, 2024

This is actually worse than I thought. This method has existed since iOS 2.0.

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIColor_Class/Reference/Reference.html

Yuck.

from maconfirmbutton.

Related Issues (8)

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.