moai/moai-beta — pull request #7 by dubois (2011-10-29 03:43:23+00:00)
Title: iOS: implement MOAIEnvironment.getDevModel(), MOAIEnvironment.getDeviceSi

iOS: implement MOAIEnvironment.getDevModel(), MOAIEnvironment.getDeviceSize()

Rationale:

Currently, we have MOAISim.getDeviceSize() and
MOAIEnvironment.getViewSize(). They have identical implementations
(return info about the view), even though the doxygen says that
.getDeviceSize() returns info about the screen.

This change moves getDeviceSize() to MOAIEnvironment (I believe
Patrick mentioned that this should happen at some point), and adds an
iOS implementation that returns the screen size. Other platforms get
(0,0).

I left MOAISim.getDeviceSize() alone; I didn't know if it should be
deprecated, or forwarded temporarily, simply deleted, or what.

Additionally, iOS getDevModel() now returns a string like "iPad1,1".