CCScrollView and CCTableView RRS feed

  • Question

  • User123339 posted

    Hi there,

    Are there any examples somewhere on how to use the CCScrollView or CCTableView from the extensions here ??

    Is it possible to add a ScrollView or a TableView into a CCNode?

    Thursday, July 30, 2015 12:59 PM

All replies

  • User68494 posted

    Hey Muhamed

    All the code in the Extensions are really just that, Extensions, and are not a priority to keep up to date with the core. They may work or not. We did not want to loose the code as they are really great examples of how things can be done. Only recently have I been working on making them work but again not a priority.

    There are examples for a TableView here which uses a ScrollView.

    Friday, July 31, 2015 4:58 AM
  • User123339 posted

    Hi @kjpou1

    Thanks for the explanation and link. I tried exactly the same thing as in the example tests, but unfortunately I cannot see any TableView when I add it to the scene. Is CCTableView working as it is in this state?

    I add this to the MainLayer:

    var tableView = new CCTableView (this, new CCSize (260, 60));
    tableView.Direction = CCScrollViewDirection.Horizontal;
    tableView.Position = new CCPoint(20, winSize.Height / 2 - 30);
    tableView.Delegate = this;
    AddChild (tableView);

    And then implement the functions TableCellSizeForIndex, TableCellAtIndex and NumberOfCellsInTableView as in the example test.

    Unortunately I can't see anything when running it.

    Saturday, August 1, 2015 12:40 PM