igenius-srl / igcolorpicker Goto Github PK
View Code? Open in Web Editor NEWA customizable color picker for iOS in Swift
License: MIT License
A customizable color picker for iOS in Swift
License: MIT License
Hi!
Thanks for the lib. How can I select item programmatically?
colorPickerView.preselectedIndex = newValue didn't worked for me
Thanks
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.
The UICollectionView and UICollectionViewFlowLayout are both private so I am not sure how to change scroll direction to vertical. Any ideas?
Thanks a lot for this library, it's pretty good!
I realise when I put the picker as full screen with limited number of colors, they start filling in vertically instead of horizontally first. Is there a way to customise this?
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?
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.
Hi, thanks for this cool library. Are there any plans to add Swift 4 and Xcode 9 support?
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 !
issue reproduce: https://github.com/chrischen-melb/IGColorPicker/commit/356062246b85b246edd3499d99724ce481d5d748
@objc optional func colorPickerView(_ colorPickerView: ColorPickerView, didDeselectItemAt indexPath: IndexPath)
是否可以更新到Swift5?
I'd like to supply a border to each of the color cells since it's very hard to see the white color.
M13Checkbox (= 3.2.2)
required by Podfile.lock
M13Checkbox (~> 2.2.0)
required by IGColorPicker (0.2.0)
Now with Xcode 11 SPM is built in to Xcode, I think it'd be awesome if you added SPM support
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`
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.
Hi,
Great framework!
How can we use it in an Objective-c project please?
Thanks,
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!
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.