08-28-2010, 01:14 PM
I'm testing my client against SamVimes' autorotating template, which switches from 320x480 to 480x320 when the iPhone is rotated from portrait to landscape. As I expect, the NewTemplate messages are telling me the proper size, either 320x480 or 480x320. However, after rotation the EndDraw messages tell me that the area to be updated is 480x480.
In version 1 of the protocol, I would use the EndDraw size to determine the scrolling content size. But in version 2, I have the NewTemplate messages to give me that more accurately. So my question is, if I have received a NewTemplate, can I always limit my scrolling content size to the size given by the NewTemplate message, and ignore the EndDraw size? That would work well in the case I describe above, but I want to make sure there aren't situations where no NewTemplate gets sent, in which case I might wind up cutting off legitimate content because I'm using an out-of-date template size.
In version 1 of the protocol, I would use the EndDraw size to determine the scrolling content size. But in version 2, I have the NewTemplate messages to give me that more accurately. So my question is, if I have received a NewTemplate, can I always limit my scrolling content size to the size given by the NewTemplate message, and ignore the EndDraw size? That would work well in the case I describe above, but I want to make sure there aren't situations where no NewTemplate gets sent, in which case I might wind up cutting off legitimate content because I'm using an out-of-date template size.