class MotionWizard::AnimationStrategy::Ios7SlideRightToLeft
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/motion-wizard/animation_strategy/ios7_slide_right_to_left.rb, line 4 def initialize super @duration = 0.25 end
Public Instance Methods
animate()
click to toggle source
# File lib/motion-wizard/animation_strategy/ios7_slide_right_to_left.rb, line 9 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, App.frame.size.width, 0, @show_view_after_block) do_slide_animation(@hide_view, 0, -70, @hide_view_after_block) end