I have a main display group, which contains 7 smaller display groups for UI, messages etc:
allLayers = display.newGroup()
backgroundLayer = display.newGroup()
mainLayer = display.newGroup()
overlayLayer = display.newGroup()
tileOpenedLayer = display.newGroup()
helpLayer = display.newGroup()
retryLayer = display.newGroup()
topLayer = display.newGroup()
allLayers:insert(backgroundLayer)
allLayers:insert(mainLayer)
allLayers:insert(overlayLayer)
allLayers:insert(tileOpenedLayer)
allLayers:insert(helpLayer)
allLayers:insert(retryLayer)
allLayers:insert(topLayer)
It might seem a little bit unnecessary to some, but each of these layers can potentially be displaying an object at the same time, and I needed to make sure they were drawn in the correct order.
On the simulator everything works fine. However on iOS devices, the ‘retryLayer’ always renders above the ‘topLayer’. I have no idea why it would be different on iOS devices, unless it has problems with nested display groups.
I have also tried using topLayer:toFront() to try and force it to the front (even though it should already be there), and I don’t use toBack() or toFront() anywhere else in the project.
Any ideas? [import]uid: 84115 topic_id: 35006 reply_id: 335006[/import]