Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5020
reload/updateData doesn't work as expected
posted

I think there's a small bug in the grid. If you assign a datasource in viewDidLoad, and then subsequently change it in viewWillAppear and call reload/updateData, it doesn't call the data source methods again until everything has been rendered once. I have worked around this bug buy only assigning the data source once during view initialization. We do this because our view controller has a default data source.

Parents
  • 40030
    Offline posted

    Hey Caylan, 

    I wasn't able to reproduce that behavior. 

    I've attached a sample. 

    Note the output in the console:

    2015-02-10 09:13:28.827 DataSourceTest[36586:3280345] viewDidLoad Pre DataSource1

    2015-02-10 09:13:28.827 DataSourceTest[36586:3280345] DS1 getColCount

    2015-02-10 09:13:28.828 DataSourceTest[36586:3280345] DS1 getRowCount

    2015-02-10 09:13:28.828 DataSourceTest[36586:3280345] DS1 getCell

    2015-02-10 09:13:28.829 DataSourceTest[36586:3280345] viewDidLoad Post DataSource1

    2015-02-10 09:13:28.830 DataSourceTest[36586:3280345] viewWillAppear Pre DataSource2

    2015-02-10 09:13:28.830 DataSourceTest[36586:3280345] DS2 getColCount

    2015-02-10 09:13:28.830 DataSourceTest[36586:3280345] DS2 getRowCount

    2015-02-10 09:13:28.830 DataSourceTest[36586:3280345] DS2 getCell

    2015-02-10 09:13:28.831 DataSourceTest[36586:3280345] viewWillAppear Pre DataSource2


    -SteveZ

     

    DataSourceTest.zip
Reply Children
No Data