Sha256: 7fa5adabc0e9bbc18a4c35dee0599f8fb5fc0bfdfefa2c3d47cf65f0ae6085e3
Contents?: true
Size: 592 Bytes
Versions: 1
Compression:
Stored size: 592 Bytes
Contents
describe "UIView animation methods" do before do @view = UIView.alloc.initWithFrame([[1,2],[3,4]]) end it 'should delta_to x:1 y:2' do @view.delta_to([1,2]).frame.should == CGRectMake(2,4,3,4) end it 'should rotate 45 degrees' do angle = 45*Math::PI/180 @view.rotate_to(angle) current_angle = Math.atan2(@view.transform.b, @view.transform.a) current_angle.should == angle end it 'should animate anything' do UIView.animate { @view.frame = [[0, 0], [0, 0]] } CGRectEqualToRect(@view.frame, [[0, 0], [0, 0]]).should == true end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sugarcube-0.18.1 | spec/uiview_animation_spec.rb |