Skip to content

Latest commit

 

History

History
74 lines (47 loc) · 2.57 KB

README.md

File metadata and controls

74 lines (47 loc) · 2.57 KB

iOS Behaviors

Swift Build Status

This Swift library contains a set of usefulf behaviors implemented to simplify your iOS projects. The concept behind this approach is explored in objc.ios Issue 13.

Why use Behaviors?

Check out the objc.io issue 13 for extra details, but basically Behaviors allow you to write better code by pushing to the maximum extent concepts like Composition and Single Responsibility Principle. By using Behaviors, you can compose your views with multiple small objects from your InterfaceBuilder and dramatically reduce the amount of lines in your UIViewController. The resulting code is more reusable and testable.

List of behaviours

This is the list of current and posible future behaviors that will be implemented.

  • Animations

    • Hide navigation/tabbar on scroll: NavigationHideScrollBehavior
    • Background Parallax: TODO
    • Scroll View Parallax: TODO
    • Table row appear animation: TODO
    • Shake: TODO
    • Pull to expand view: TODO
  • Forms

    • Autoscrolling on textfield focus: TextFieldScrollBehavior
    • Focus on next control: TextFieldResponderBehavior
    • Move view on top of keyboard: ViewPositionKeyboardBehavior
    • Regex validator: TextFieldRegexValidatorBehavior
    • Email validator: TextFieldEmailValidatorBehavior
    • Phone validator: TextFieldPhoneValidatorBehavior
    • Credit card validator: TextFieldCreditCardValidatorBehavior
    • Button enabler: TODO
    • Textfield effects (selected, required, error...): TODO
  • Others

    • Scroll offset listener: ScrollingTriggerBehavior
    • Keyboard lister: KeyboardTriggerBehavior
    • Delegate multiplexor: TODO
    • Autolayout view visibility gone: TODO

License

Made available under the MIT License.

Collaboration

Forks, patches and other feedback are always welcome.

Credits

Behaviors is brought to you by Angel Garcia Olloqui. You can contact me on:

Project Page: Behaviors

Personal webpage: angelolloqui.com

Twitter: @angelolloqui

LinkedIn: angelolloqui