saim80/Cocos2D-Extensions — Issue #12: boundingBox property has wrong values when adding to node other than CCLayer
Author: mgrebenets
Created: 2012-01-24 14:49:37+00:00
State: open

Here's what I did - when doing same thing as in sample project, it works as expected.
In samples table view node is added as subview to CCLayer.

But everything goes amiss, when adding table view as a child to another CCNode.
My layout is as follows:
3 CCNode subviews are children of CCLayer
- CCLayer
- CCNode 1, rect=(0, 320, 320, 180)
- CCNode 2, rect=(0, 160, 320, 180)
- CCNode 3, rect=(0, 0, 320, 180)

Then I try to add SWTableView to CCNode 2
It is added, but it's bounding box size is wrong, while origin is still correct.
boundingBox size=(0.000000, 0.000000)
boundingBox origin=(0.000000, 160.000000)

I run this test in iPhone Simulator (both Retina and non-Retina have this error)
Cocos2D version is 1.0.1
Source downloaded from github 25 Jan 2012