CRColorPicker
CRColorPicker copied to clipboard
Convert from color to touch point
Hello, it's a nice and clean control. Is any way to convert from color to touch point? Thank you very much.
Hello, it is an over control. Maybe a touch grid control, not a color picker. But yes it easy but I need to create it.
Or in CRColorPicker.m (https://github.com/Cclleemm/CRColorPicker/blob/master/CRColorPicker/CRColorPicker/CRColorPicker.m#L84)
you can add an over method like that :
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint touchPoint = [touch locationInView:self];
[self positionWithTouchPoint:touchPoint];
if(self.delegate!=nil){
if([self.delegate respondsToSelector:@selector(positionIsChanging:)]){
[self.delegate positionIsChanging:touchPoint];
}
}
}
Hello,
Sorry I don't get it. I want to add a circle view on the color picker. When the touch moves, the circle view will present the color of point. This part is already finished, now I want to add an initial color for the circle view and set the circle view to the right position on the color picker. So my question is there any way to convert from color to touch point? Something like: (CGPoint)touchPointFromColor:(UIColor *)color
Thanks, Amos