Safari View

BTW I should add that my original report above focused on the lack of the resize event, which isn’t actually necessary (we can test for orientation changes ourselves in our SV listener and redraw if necessary). So it may have sent you down the wrong path. The problem is that the Corona canvas maintains the portrait dimensions when the device has changed orientation to landscape while the SV controller was active.

Hi @corona273,

Thanks for the clarification. I’ll prompt the engineers to see if they can (easily) fix this. In the meantime, it seems that calling your resize listener after the SV closes is a viable solution, correct?

Brent

it seems that calling your resize listener after the SV closes is a viable solution, correct?

Brent, thanks for your response. No, calling the resize listener after the SV closes is not a viable solution – it will simply repaint the existing screen. That is why this is a significant Corona SDK bug.

The reason it is not a viable solution is because the canvas that Corona runtime provides to our lua app has not been resized. The Corona SDK needs to resize the canvas. Look at my example from last night based on print statements after tapping “Done” in SV:

With no rotation in SV:

Oct  7 20:06:23 SafariViewB[12460] <Warning>: portrait

Oct  7 20:06:23 SafariViewB[12460] <Warning>: CONTENT W/H: 320 480

 

With rotation in SV:

Oct  7 20:06:49 SafariViewB[12460] <Warning>: landscapeLeft

Oct  7 20:06:49 SafariViewB[12460] <Warning>: CONTENT W/H: 320 480

 

The Corona runtime environment failed to resize the canvas – more generally, it should never provide us with a 320x480 canvas when an iPhone is in landscape mode. That is a bug. That is what your developers need to fix.

The correct behavior should be to provide us with a 480x320 canvas if rotation to landscape happens while SV is active.

Put another way, when an iPhone is in landscape mode, the canvas should never be taller than it is wide! But it is. This is the bug. There is nothing we can do about it. Corona staff needs to fix it.

Hi @corona273,

Just to confirm, you should have received a response to your bug report that this issue is fixed and will apply in upcoming daily builds.

Brent

Brent: I haven’t downloaded and tested today’s daily build yet, but this looks promising:

  • iOS: checking for pending resize or orientation evente when returning from other fullscreen views (casenum 43204 , casenum 43199)

 

 

Thank you!