Sha256: 8f5f1eb752d3f6bcf973ac6f756c3ef552185cdef4659bff48d72614c1eedb98

Contents?: true

Size: 661 Bytes

Versions: 1

Compression:

Stored size: 661 Bytes

Contents

module MotionWizard
  module AnimationStrategy
    class Ios7SlideLeftToRight < SlideAnimation
      def initialize
        super
        @duration = 0.25
      end

      def animate
        show_view_index = @show_view.superview.subviews.index(@show_view)
        hide_view_index = @show_view.superview.subviews.index(@hide_view)
        @show_view.superview.exchangeSubviewAtIndex(hide_view_index, withSubviewAtIndex: show_view_index) if show_view_index > hide_view_index
        do_slide_animation(@show_view, -70, 0, @show_view_after_block)
        do_slide_animation(@hide_view, 0, App.frame.size.width, @hide_view_after_block)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
motion-wizard-0.1 lib/motion-wizard/animation_strategy/ios7_slide_left_to_right.rb