Giter Site home page Giter Site logo

cocoatoucher / aiflatswitch Goto Github PK

View Code? Open in Web Editor NEW
983.0 983.0 65.0 139 KB

Nicely animated flat design switch alternative to UISwitch

License: MIT License

Swift 97.75% Objective-C 2.25%
animated animation button checkbox checkmark custom design flat material smooth swift switch uiswitch

aiflatswitch's People

Contributors

bryant1410 avatar cocoatoucher avatar darkkrye avatar dehlen avatar donvaughn avatar maryom 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aiflatswitch's Issues

Tap event not working in Swift 1.3

The function onTouchUpInside is not getting called. I am making the switch programmatically. I am using Swift 1.3. Could not understand why it is not working. Please help!

Min Deployment Target 8.0 = Warning in Xcode

AIFlatSwitch/Package.swift The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99.

Maybe someone can set the min version for iOS to 9.0 ? :) Thanks

OnSwitchValueChanged cast issue

The example you provided for OnSwitchValueChanged doesn't seem to work. The casting will always fail. When trying to implicitly cast as AIFlatSwitch like so I get an error.

//Cast
let coolSwitch = sender as! AIFlatSwitch

//Error
Could not cast value of type 'AIFlatSwitch.AIFlatSwitch' (0x23c588) to 'aiflatswitch.AIFlatSwitch' (0xc8428).

Is this a bug or am I doing something wrong?

animation callbacks

Hello, it would be nice to have a callback blocs for animation did start and animation did end.
What do you think? I have to address this scenario:

I've got the switches tableview's rows, and when the switch changes from off to on, I have to reorder the table, but the animation during the reording is not fine.

Exceeds the size of the view by 1

Hello,
I really like your library however I just encountered a litte UI-Bug. The drawn uicontrol is too big by 1 pixel for the containing UIView. You can see this behaviour in your example application:
bildschirmfoto 2015-10-24 um 15 11 01

However when running the application it looks normal because the background color of the views are the same. But in my situtation the views background color's were not the same.

I will make a PR to fix this problem.
Feel free to merge.

Best Regards,
David

Manual Installation

CocoaPods and Carthage are awesome tools and make our life really easier, but there are some devs who still don't know how to use them.

It would be cool to add the Manual installation guide in your README.md. You can take a look at my iOS Readme Template to see how you can do it.

Inner circle color

Hey,

Thanks for your work.

Is there a way to set a color just for the inner circle?

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.