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.
We can test the rotation of the device by calling the following event:
rotate_device(:to => orientation, :button => location)
rotate_device command allows us to pass the following two arguments:
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, ...