Code Monkey home page Code Monkey logo

igcolorpicker's People

Contributors

aiden-leong avatar andreaantonioni avatar johan12345 avatar jomisj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

igcolorpicker's Issues

Select item programmatically

Hi!

Thanks for the lib. How can I select item programmatically?
colorPickerView.preselectedIndex = newValue didn't worked for me

Thanks

Scroll to preselectedIndex doesn't work correctly

I tried to scroll this Picker to a default value, and unfortunately, it works only from viewDidAppear.

    override func viewDidAppear(_ animated: Bool) {
            colorPicker.preselectedIndex = Int(task.colorIndex)
    }

If I try to use from viewDidLoad or from viewWillAppear, it doesn't work at all. However viewDidAppear it is not very suitable for it, because it shows colors and scrolls only after. It looks like a bug.

How do I change scroll direction?

The UICollectionView and UICollectionViewFlowLayout are both private so I am not sure how to change scroll direction to vertical. Any ideas?

Create label next to each color

Hi, I'm considering using IGColorPicker to implement a tag/bookmark feature in my notebook app. The user can choose different colors to identify pages and then filter through pages based on the color later. I want to label each color as per the right screen mockup. Is that achievable with IGColorPicker?

IMG_5959

M13 checkbox errors

After installing IGColorPicker and opening MyApp.xcworkspace, I get many build errors all related to M13 checkbox. on import M13Checkbox the error is "Could not build Objective-C module M13Checkbox.

Swift 4 support?

Hi, thanks for this cool library. Are there any plans to add Swift 4 and Xcode 9 support?

Delegate method not called when deselect color

Hi !

First, thank you :)

When I'm deselecting a color, the delegate method is not called. Am I missing something ?
This method is only called when changing color selection.

func colorPickerView(_ colorPickerView: ColorPickerView, didDeselectItemAt indexPath: IndexPath) {
    // A color has been deselected
  }

Thanks for your help !

Bug? delegate method didDeselectItemAt is not called when same color is deselected

issue reproduce: https://github.com/chrischen-melb/IGColorPicker/commit/356062246b85b246edd3499d99724ce481d5d748

  1. when . isSelectedColorTappable is set to true, user can deselect a color
  2. however, this operation doesn't trigger optional delegate method @objc optional func colorPickerView(_ colorPickerView: ColorPickerView, didDeselectItemAt indexPath: IndexPath)
  3. selecting a different color will trigger this delegate method somehow

Pod not found

I've added the line
pod 'IGColorPicker'
to my podfile, but I get
[!] Unable to find a specification for IGColorPicker

Similarly

$ pod search "IGColorPicker"
[!] Unable to find a pod with name, author, summary, or description matching `IGColorPicker`

IGColorPicker subview doesn't respond to gestures

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

Objective-c

Hi,

Great framework!

How can we use it in an Objective-c project please?

Thanks,

change the colors after initializing ColorPickerView

I want to change the list of colors after initializing colorPickerView in viewDidLoad(),
how can I do that?

	override func viewDidLoad() {
        super.viewDidLoad()

        Setting.registerDefaults()
        setupScene()
        setupDebug()
        setupUIControls()
		setupFocusSquare()
		updateSettings()
		resetVirtualObject()
        
        // Setup colorPickerView
        colorPickerView.delegate = self
        colorPickerView.layoutDelegate = self
        colorPickerView.isHidden = true;
        colorPickerView.style = .circle
        colorPickerView.selectionStyle = .check
        colorPickerView.isSelectedColorTappable = false
        colorPickerView.backgroundColor = UIColor.clear
        colorPickerView.colors = [#colorLiteral(red: 0.2588235438, green: 0.7568627596, blue: 0.9686274529, alpha: 1), #colorLiteral(red: 0.3647058904, green: 0.06666667014, blue: 0.9686274529, alpha: 1), #colorLiteral(red: 0.8549019694, green: 0.250980407, blue: 0.4784313738, alpha: 1), #colorLiteral(red: 0.9411764741, green: 0.4980392158, blue: 0.3529411852, alpha: 1), #colorLiteral(red: 0.9686274529, green: 0.78039217, blue: 0.3450980484, alpha: 1), #colorLiteral(red: 0.5843137503, green: 0.8235294223, blue: 0.4196078479, alpha: 1)]
    }

then

I want to change the list of colors like
colorPickerView.colors[0] = #colorLiteral(red: 0.3176470697, green: 0.07450980693, blue: 0.02745098062, alpha: 1)

or like
colorPickerView.colors = [#colorLiteral(red: 0.1019607857, green: 0.2784313858, blue: 0.400000006, alpha: 1), #colorLiteral(red: 0.09019608051, green: 0, blue: 0.3019607961, alpha: 1), #colorLiteral(red: 0.3098039329, green: 0.01568627544, blue: 0.1294117719, alpha: 1)]

I tried but the code above doesn't work(change the colors..), do you know how can I do that?
It would be so helpful if you can add "HOW TO UPDATE THE COLORS" on your readme.
Thank you!

Not working in Child View Controller

Perfectly working in a View controller. But when that view controller is added as a child view controller in another controller, no delegate function is working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.