ios - Positioning of elements inside CCNode -
I have created a CCNode in SpriteBuilder and add some children nodes (label, button and sprite) to add it. On the SpriteBuilder I made time to run consistently in the points regarding the position of the children node parents in the upper left corner.
I change the size of the parent's node content, but the position of children remains constant, in relation to the top.
I do this to extend the node:
self .contentSize = CGS immec (self cross system size. Width, set content size. + 50 + high);
I give color node (node that is dark blue which is a child of node being expanded and this height of is 100%) before and after the expansion It checks the contentize and actually increases 50 points but on the screenshot we can see that the dark blue area does not increase.
I also check the status of the title label before and after the extension and in this case the number is equal in the top left corner, however in the screenshots we can see that it is far from the top.
There is no code. Hard to say
Here's a piece of code that what SpriteBuilder does is visually
I hope this can help you debug your issue. You must inspect whether the reference type of your nodes position type has been set correctly.
Comments
Post a Comment