Giter VIP home page Giter VIP logo

rastislavmirek / flexcolorpicker Goto Github PK

View Code? Open in Web Editor NEW
255.0 9.0 52.0 17.28 MB

Modern color picker library written in Swift 5 that can be easily extended and customized. It aims to provide great UX and performance with stable, quality code.

License: MIT License

Objective-C 0.30% Swift 98.78% Ruby 0.91%
color-picker picker-component swift visual hsb-color-palette rgb-controller hsb-color-model uikit-framework flexibility ui-components

flexcolorpicker's People

Contributors

andriypohorilko avatar iodine- avatar mihah avatar rastislavmirek avatar sob7y 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

flexcolorpicker's Issues

Support for alpha/semi-transparent colors

Add (optional) slider for alpha value/channel of picked color.

Checkboard-like backgorund should be added to color preview control to allow preview of transparency.

Showing Alpha value slider should become an option of DefaultColorPickerViewController (off by default).

Invalid Excludes when using with Xcode 13

When building using Xcode 13 the package is going warnings about the excludes listed in the package. Both podsec and the GifsAndScreenShots are being reported as not found. Looking at the paths in the DerivedData its looking as if the paths are slightly off on the actual location and what is trying to be excluded.

iOS 13 dark mode support

I noticed that the default background color of the view controllers is "white" and not "systemBackground"

Unable to understand how to use the code

Sir i am very new to xcode and i am making an app where i must select the colour and get RGB values i am just able to add radial colour pallet and nothing more can you please brief me how to use

AutoLayout With ScrollView Crashing - iOS 15 Xcode 13

Hello,

It seems to crash no matter what constraints I set when adding the control to a scrollview that has auto layout.

Any suggestions? I will update this post with the crash stacktrace and a screenshot of my constraints.

Thanks
Joe

Brightness slider control is inverted

Hi! The brightness slider control is actually inverted (from brighter to darker). The control shows brighter as 0% and darker as 100%.

There is anyway to use this control as a default brightness control, from 0% (dark) to 100% (bright)?

Thanks in advance!

Add Hue slider

To be used with saturation slider as and alternative to hue-saturation palette.

Unable to understand how to use the code

Sir i am very new to xcode and i am making an app where i must select the colour and get RGB values i am just able to add radial colour pallet and nothing more can you please brief me how to use

ColorPickerDelegate

func colorPicker(_: ColorPickerController, confirmedColor: UIColor, usingControl: ColorControl) {
}

This Delegate Method will not call Please suggest me..

SPM support

Would be great to have Swift Package Manager support

Error when run it in xcode 10.1

screenshot 2019-01-29 at 5 18 02 pm
This issue is occurs when i am running the demo code in xcode 10.1

Please give me solution on urgent base so i can use it.

Thanks

RectangularPaletteControl has 'open' function but not declared is 'open'

Discussion: RectangularPaletteControl has 'open func setHue(horizontalAxis: Bool, updateImage: Bool)' but not declared as 'open' itself. So you cannot inherit from RectangularPaletteControl directly and you need to reimplement it's behaviour using ColorPaletteControl. If I will just copy-paste it's code there other things that is closed to override too. Or, for example, I want too use RectangularPaletteControl but override some open functions from ColorPaletteControl I cannot do that.

Suggestion: Make RectangularPaletteControl 'open' to inherit too.

SwiftUI support needed

Logic e.g. computations to translate between HSB and RGB color models and control delegates can be reused but views needs to be added for SwiftUI.

Put examples how to work with custom view via code.

Hi. Your library is so cool but the big issue that absolutely not clear to understand how use it in code. Can you add code examples how add custom elements on the layout via code. Pls don't link your Demo project, it's a lot of code, that not easy to read.

Import with XCode 11 SwiftPackageManager doesn´t compile

Hi Rastislav,
thank you so much for updating Package.Swift
The import via XCode 11/Swift Packages/Add Package Dependency now works. :-)

But unfortunately, I get 104 Compiler Errors.

The first one is:
//
// LimitedGestureViewDelegate.swift
// FlexColorPicker
//
// Created by Rastislav Mirek on 29/9/19.
//
// MIT License
// Copyright (c) 2018 Rastislav Mirek
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//

public protocol LimitedGestureViewDelegate {
func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool
}
Use of undeclared type 'UIGestureRecognizer'

Am I doing something wrong?

Memory leak

in ColorPickerThumbView
var delegate: LimitedGestureViewDelegate?
need add weak
weak var delegate: LimitedGestureViewDelegate?

Crash iOS15

I use a very simple color picker, just the default:

let colorPickerController = DefaultColorPickerViewController()
colorPickerController.delegate = self
colorPickerController.selectedColor = UIColor.init(hex: user.invoice_color_hex)
colorPickerController.navigationItem.title = "Settings_InvoiceLayout_HeadersColor".localized()
self.navigationController?.pushViewController(colorPickerController, animated: true)

It has always worked perfectly, until iOS15. It seems to crash on this line:

public var contentBounds: CGRect {
    layoutIfNeeded()
    return contentView.frame
}

//Previous functions before it arrived here

private func updateCornerRadius() {
    gradientBackgroundView.cornerRadius_ = contentBounds.height / 2
}
open override var bounds: CGRect {
    didSet {
        updateCornerRadius()
        updateThumbAndGradient(isInteractive: false)
    }
}

Swift 5.2 complaint

Description:

  • Have no warning when compiling

  • Actual behaviour:
    Swift 5.2 included in Xcode Version 11.4 reports a warning:
    In UIImageExtension.swift
    let imageRect = CGRect(origin: .zero, size: size)

Initialization of immutable value 'imageRect' was never used; consider replacing with assignment to '_' or removing it

  • FlexColorPicker version: 1.3.1
  • Xcode version: Version 11.4.1

How to reproduce:

Integrate project

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.