mattlawer/BButton

SIG Abort after download and compile

Closed this issue · 1 comments

Toze commented

I've just downloaded the bbutton and it compiles without problem. But when I click, it crashes.

Impossible to undestand why for the moment.

Debug gives me a crash on
UIColor* border = [self darkenColor:_color value:0.06];
in drawRect of BButton.m and says that _color is not of type UIColor and so it doesn't recognize the .CGColor

Toze commented

Ok, it was a memory problem: you need to add this in your color setter :

  • (void) setColor:(UIColor *)color {
    if (_color)
    [_color release];

    _color = [color retain];

But maybe you were working with ARC. In that case, I don't understand why I'm not after cloning the project