I have the following code:
Code: Select all
on orientationChanged
log "orientationChanged"
end orientationChanged
on resizeStack pNewW, pNewH, pOldW, pOldH
log "resizeStack"
send "updateInterface" to me in 0 milliseconds
end resizeStack
on updateInterface
log "updateInterface"
end updateInterface
over and over again every time you rotate the device. And sometime you do see that. But other times you see the opposite - resizeStack first followed by orientationChanged.orientationChanged
resizeStack
updateinterface
Here is the log off my iPhone 12 as I rotate my device from "portrait" to "landscape left" and back again.
There doesn't seem to be any rhyme or reason to it. Sometimes one fires first, and sometimes the other does. My macbook is too old and slow to run the xcode simulator without crashing, so I haven't tried this on anything but my physical iPhone. I'll get a hold of my son's macbook and try this one the simulator and see if it still happens. But is there something obvious I'm missing? Do I not understand how this message path works? Is my phone messed up?orientationChanged
resizeStack
updateInterface
resizeStack
updateInterface
orientationChanged
resizeStack
updateInterface
orientationChanged
orientationChanged
resizeStack
updateInterface
resizeStack
updateInterface
orientationChanged