Cocoanetics / DTFoundation

Standard toolset classes and categories
BSD 2-Clause "Simplified" License
802 stars 237 forks source link

DTCustomColoredAccessory #27

Closed CarlKabbe closed 11 years ago

CarlKabbe commented 11 years ago

Could you add the code below to DTCustomColoredAccessory along with a new DTCustomColoredAccessoryType called DTCustomColoredAccessoryTypeLeft This creates an arrow that points left

case DTCustomColoredAccessoryTypeLeft:
    {
        // (x,y) is the tip of the arrow
        CGFloat x = CGRectGetMaxX(self.bounds)-10.0;;
        CGFloat y = CGRectGetMidY(self.bounds);

        CGContextMoveToPoint(ctxt, x+R, y+R);
        CGContextAddLineToPoint(ctxt, x, y);
        CGContextAddLineToPoint(ctxt, x+R, y-R);
        break;
    }
odrobnik commented 11 years ago

@CarlKabbe Added it. Thank you for your code contribution!