Skip to content

IGColorPicker subview doesn't respond to gestures #34

@alamodey

Description

@alamodey

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions