Coder Social home page Coder Social logo

Comments (2)

andrewroycarter avatar andrewroycarter commented on July 26, 2024

Hi!
Sorry for the delay in getting back to you!
Can you upload an example project which will show the issue? I'd be glad to check into it and get the issue resolved!

from timescroller.

dreampowder avatar dreampowder commented on July 26, 2024

Strange but i've modified your demo project to do the same thing and it is working :) i guess i should be focusing on my own code.

Thanks for open sourcing this wonderful component!

i've added this code to the demo project:

- (void)addData{
NSCalendar *calendar = [NSCalendar currentCalendar];
NSDateComponents *components = [[NSDateComponents alloc] init];
NSDate* today = [_datasource objectAtIndex:[_datasource count]-1];
NSDateComponents *todayComponents = [calendar components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit fromDate:today];
for (int i = [todayComponents day]; i >= -15; i--)
{
    [components setYear:[todayComponents year]];
    [components setMonth:[todayComponents month]];
    [components setDay:i];
    [components setHour:arc4random() % 23];
    [components setMinute:arc4random() % 59];
    NSDate *date = [calendar dateFromComponents:components];
    [_datasource addObject:date];
}
[self.tableView reloadData];
}

and this one to the end of "cellForRowAtIndexPath" delegate method:

if(indexPath.row==[_datasource count]-1){
    NSLog(@"Adding Data");
    [self addData];
}

from timescroller.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.