Most of the iOS applications make use of the various device capabilities. As a good practice, we must test these features to deliver high quality apps. RubyMotion gives us an environment to test some device capabilities. Let's discuss a few of them in this section.
rotate_device(:to => orientation, :button => location)
to: This passes the orientation to rotate the device; it can either have portrait or landscape as a value.
buttonhere indicates the position of the home button; it makes sense if we pass the values based on the first value of orientation. In portrait mode, we can opt for the
:top buttonlocation. In landscape mode, we can opt for
:rightwith respect to the button location, for example,
This device event will rotate...