sgl0v / MSColorPicker

Color picker component for iOS
MIT License
190 stars 29 forks source link

Use only the color wheel #7

Open jrosales90 opened 5 years ago

jrosales90 commented 5 years ago

The MSColorPicker is so good, but i need to use the color wheel. Is possible? For example, i have a a view in my view controller, and need to put the wheel is the view.

I hope you should can respond me. Regards.

sgl0v commented 5 years ago

Hi! Sorry for not replying promptly. You can just add several files to your project that implement a color wheel:

Listen to UIControlEventValueChanged control event to get notifications about color change.

MarkBirch3D commented 4 years ago

Hey. I'm late to the party but I wanted to do the same thing. Here's what I did, for anyone else trying to do the same thing.

Basically, what I did is create a class that subclasses MSColorSelectionViewController and initialize that this new subclass instead.

The only thing I added to this subclass is this:

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.navigationController.navigationBarHidden = YES;
    [self.colorSelectionView setSelectedIndex:1 animated:NO];
}

- (MSColorSelectionView *)colorSelectionView
{
    return (MSColorSelectionView *)self.view;
}

I now have only the wheel mode