Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animatable checkbox: Default checked and unchecked icon #68

Open
JakeLin opened this issue Feb 8, 2016 · 5 comments
Open

Animatable checkbox: Default checked and unchecked icon #68

JakeLin opened this issue Feb 8, 2016 · 5 comments

Comments

@JakeLin
Copy link
Member

JakeLin commented Feb 8, 2016

Using path to avoid image assets?

@tbaranes
Copy link
Member

What's the difference with the existing images in CheckboxDesignable?

  public func configCheckBoxCheckedImage() {
    guard let unwrappedCheckedImage = checkedImage else {
      return
    }

    setBackgroundImage(unwrappedCheckedImage, forState: .Selected)
    setBackgroundImage(unwrappedCheckedImage, forState: [.Selected, .Highlighted])
  }

  public func configCheckBoxUncheckedImage() {
    guard let unwrappedUncheckedImage = uncheckedImage else {
      return
    }

    setBackgroundImage(unwrappedUncheckedImage, forState: .Normal)
  }

@JakeLin
Copy link
Member Author

JakeLin commented Jun 27, 2016

@tbaranes To avoid including any asset in IBAnimtable, the user need to have two images when they use AnimatableCheckbox. And need to set both checkedImage and uncheckedImage properties to the image assets.

Do you think it is useful to provide default tick and cross signs in paths? Then the user doesn't need to provide images any more. The good part of the path is they can animate from one state to another. Something like http://cloudcannon.com/deconstructions/2014/12/05/material-design-delightful-details.html . But in our case, it will animate a tick to cross and vice verse like https://www.youtube.com/watch?v=56GzZ8PYL68

@tbaranes
Copy link
Member

I see. Yeah, that can be really useful for prototyping (like predefined{Color,Gradient}. I'm just not sure to includes specific images directly in IBAnimatable, if we do the #67, instead of default images, we can have directly a custom animation which can include default value.

Anyway, I now understand that issue 😆

@JakeLin
Copy link
Member Author

JakeLin commented Jun 27, 2016

@tbaranes #67 are related, and maybe we can merge them into one issue. We can provide a path for checkbox and some default animations. And allow the user set the color and animation type.

@tbaranes
Copy link
Member

Sounds cool 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants