Skip to content

Collection of useful Behaviors as explained in Objc.io Issue 13

Notifications You must be signed in to change notification settings

angelolloqui/Behaviors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Collection of useful Behaviors as explained in Objc.io Issue 13

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published