Giter Club home page Giter Club logo

valuestepper's People

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

valuestepper's Issues

Change font/font size

Hi,
I would like to change font(and size) of valueLabel, but it is private. Maybe you can add property to change font also?

Not able to get tag for Decrement Button.

/// - decrease: decrease button has tag 0.
/// - increase: increase button has tag 1.
private enum Button: Int {
case decrease
case increase
}

You can not set the tag value of an element to 0. Need to modify that logic in order to get elements by tag value correctly.

/// - decrease: decrease button has tag 1.
/// - increase: increase button has tag 2.
private enum Button: Int {
case decrease = 1
case increase = 2
}

Multiple ValueStepper Used in CollectionView keeps calling target function

When we use ValueStepper in collectionView Cell, every time reusable cell is allocated, ValueStepper calls target method even though when it is not required. Also when altering value of the stepper, target method is called. What I think is you can remove Action(for:) from DidSet of value variable.

Bug in labelPressed function

There is a subtle bug in labelPressed function on line 360. The following line of code
if newValue >= self.minimumValue || newValue <= self.maximumValue
must be replaced by
if newValue >= self.minimumValue && newValue <= self.maximumValue

The || operator must be replaced by && operator.

SPM support

Hi,
can you add the support for Swift Package Manager??

Thank

Don't return early from increase/decrease functions when auto repeat is enabled

The return statement on lines 255 and 265 prevent a normal tap from changing the value and forces the user to tap+hold to change the value when autorepeat is enabled. Removing these two lines will cause the control to behave like the standard UIStepper where a tap+release will change the value by the step amount exactly once and a tap+hold will still autorepeat the value change.

INCREMENT / DECREMENT

Hello, please add a callback If user Increment or decrement it would be a lot easier for us thanks, because for now we need to store the previous value to check if it's +1 / - 1

IBDesignable error

I got this error failed to render and update auto layout no suitable image found after installing via cocoa pods

Build Error - Shared is unavailable

I installed using Pod as indicated. Made no changes and instantly had the error. "Shared" is unavailable. Use New Controller based solution.

Using Xcode 8.3.3. Thanks for your help!
Howard

Error on compilation

ValueStepper.swift line 205

override open static var requiresConstraintBasedLayout: Bool 

produces error:

Static declarations are implicitly 'final'; use 'public' instead of 'open'

changing tint color of stepper doesn't update the decrease/increate layer (- / +)

I have put the stepper in a tableViewCell, and for testing purposes every time the cell is show, the tint color is chosen randomly so, so once they go out of view, and come back they will have new color.
screen shot 2017-01-26 at 1 33 38 pm
After coming back into view.
screen shot 2017-01-26 at 1 34 01 pm

fix would be to add these into func tintColorDidChange()

increaseLayer.strokeColor = tintColor.cgColor
decreaseLayer.strokeColor = tintColor.cgColor

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.