Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IGColorPicker subview doesn't respond to gestures #34

Open
alamodey opened this issue Aug 16, 2020 · 2 comments
Open

IGColorPicker subview doesn't respond to gestures #34

alamodey opened this issue Aug 16, 2020 · 2 comments

Comments

@alamodey
Copy link

I'm just following the basic code in the documentation and put this in my viewDidLoad:

// Setup colorPickerView
    colorPickerView = ColorPickerView(frame: CGRect(x: 0.0, y: 0.0, width: 200, height: 100))
    
    colorPickerView.delegate = self
    colorPickerView.layoutDelegate = self
    colorPickerView.style = .circle
    colorPickerView.selectionStyle = .check
    colorPickerView.isSelectedColorTappable = true
    colorPickerView.backgroundColor = .systemGray3
    
    
    colorPickerView.colors = [
    UIColor(red: 0.114, green: 0.169, blue: 0.325, alpha: 1.000),
    UIColor(red: 0.494, green: 0.141, blue: 0.325, alpha: 1.000),
    UIColor(red: 0.000, green: 0.529, blue: 0.318, alpha: 1.000),
    UIColor(red: 1.000, green: 0.000, blue: 0.302, alpha: 1.000),
    UIColor(red: 1.000, green: 0.639, blue: 0.000, alpha: 1.000),
    UIColor(red: 1.000, green: 0.925, blue: 0.153, alpha: 1.000),
    UIColor(red: 0.000, green: 0.898, blue: 0.212, alpha: 1.000),
    UIColor(red: 0.161, green: 0.682, blue: 1.000, alpha: 1.000),
    UIColor(red: 0.514, green: 0.463, blue: 0.612, alpha: 1.000),
    UIColor(red: 1.000, green: 0.467, blue: 0.659, alpha: 1.000)]

    jpTextView.addSubview(colorPickerView)

It looks as expected and appears above all my other views, but why can't I interact with it? I seem to be able to highlight text in the UITextView below this subview.

Simulator Screen Shot - iPhone 11 - 2020-08-16 at 15 48 26

@alamodey
Copy link
Author

For some reason to make the circles respond, I need to hold down on them for about 3 seconds. Does anyone know why it's acting so odd? I want to just tap to select the color.

@siki88
Copy link

siki88 commented Sep 22, 2020

There is some way clicked ? long hold to choose color. THX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants