Coder Social home page Coder Social logo

timescroller's Introduction

ACTimeScroller

A UI Element that hovers beside the scroll bar of a UITableView (Mimicking the Path app).

timescroller's People

Contributors

andrewroycarter avatar coreyfloyd avatar flagg19 avatar jpsim avatar problame avatar sofokli1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timescroller's Issues

Hands in the clock not moving, though the time in the text is right

Hi, Thanks so much for this wonderful TimeScroller! I simply love it :-) !

Am using iOS 5 and Xcode 4.2. Am writing a simple app that has a simple layout : a text box and a button at the top half of the screen, and a TableView at the bottom half. As the user keeps entering the text, it keeps getting added to the table. The timer is appearing as I scroll, and the date/time is also being displayed correctly, but the hands in the clock aren't moving. Can you please help?

In the ViewController.h
@interface com_FirstViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, TimeScrollerDelegate> {
...
...
TimeScroller * _timeScroller;
....
}
...
@Property (nonatomic, retain) TimeScroller * _timeScroller;
....

In ViewController.m:
....

import "TimeScroller.h"

....
....
....

  • (void)viewDidLoad {

    [super viewDidLoad];
    _timeScroller = [[TimeScroller alloc] initWithDelegate:self];
    ....
    ....
    }
    ....
    ....
    ....

  • (UITableView *)tableViewForTimeScroller: (TimeScroller *)timeScroller {
    NSLog(@"tableViewForTimeScroller : returned UITableView");
    return table;
    }

//The date for a given cell

  • (NSDate *)dateForCell:(UITableViewCell *)cell {

    NSIndexPath *indexPath = [table indexPathForCell:cell];
    int timeInt = [[[arrayInput objectAtIndex:[indexPath row]] objectForKey:@"time"] intValue];
    NSDate *time = [Utility getIntAsDate:timeInt];
    NSLog(@"returned time for scroller: %@", time);
    return time;
    }

  • (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    NSLog(@"scrollViewDidScroll");
    [_timeScroller scrollViewDidScroll];
    }

  • (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
    NSLog(@"scrollViewDidEndDecelerating");
    [_timeScroller scrollViewDidEndDecelerating];
    }

  • (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
    NSLog(@"scrollViewWillBeginDragging");
    [_timeScroller scrollViewWillBeginDragging];
    }

  • (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
    NSLog(@"scrollViewDidEndDragging");
    if (!decelerate) {
    [_timeScroller scrollViewDidEndDecelerating];
    }
    }

@EnD

iOS7 Support

The method "- (void)captureTableViewAndScrollBar" returns no Scrollbar in iOS 7. Therefore this component is not working on iOS 7.

Please add semantic version tags.

I’ve recently added TimeScroller to the CocoaPods package manager repo.

CocoaPods is a tool for managing dependencies for OSX and iOS Xcode projects and provides a central repository for iOS/OSX libraries. This makes adding libraries to a project and updating them extremely easy and it will help users to resolve dependencies of the libraries they use.

However, TimeScroller doesn't have version tags. I’ve added the current HEAD as version 0.0.1, but a version tag will make dependency resolution much easier.

Semantic version tags (instead of plain commit hashes/revisions) allow for resolution of cross-dependencies.

timeScroller won't work if rows could not full fill at least one page

Xcode: 4.3.2
IOS SDK: ISO5.1

if the row cout is too less to fill one page of the uitableView, and the scroll indicator is not shown, the timer scroller does not work as expected. It seems that this project relies on the scroll indicator, I am not sure if this is a limitation or we can fix it...

You can simply modify this demo project and change " i >= -15" to make sure the row number is less than 10, and reproduce this issue. e.g, today is 04.27, you can change it to "i>=20".....

for (int i = todayComponents.day; i >= -15; i--) {

        NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
        [dictionary setObject:@"Title here" forKey:@"title"];

        components.year = todayComponents.year;
        components.month = todayComponents.month;
        components.day = i;
        components.hour = arc4random() % 23;
        components.minute = arc4random() % 59;

        NSDate *date = [calendar dateFromComponents:components];
        [dictionary setObject:date forKey:@"date"];

        [_datasource addObject:dictionary];

    }

Switching View Controllers causes TimeScroller to "Multiply"

In many navigation based apps I've tested TimeScroller, if you push a new ViewController onto the navigation stack, and then navigate back to the ViewController TimeScroller will do what you see in the screenshot below, if I reinitialize the ViewController with TimeScroller in it it behaves correctly again (which is obvious since the VC is being reinitialized).

Screenshot: http://cl.ly/image/1X1A0q472D0m

I'm not sure if I'm just doing something wrong or not but I literally used the sample code verbatim.

Not working on iPad iOS5

I have setup all the things needed.
there is a problem with hitTest withEvent..
which is returning a tableview instead of UITableviewCellContentView..
Please help me with this

Timescroller doesnt update when tableview has new rows

Hi there, first of all, thanks very much for this wonderfull looking component.

My problem is when i add new data to my tableview, timescroller prevents tableview to scroll to bottom and keeps the tableview on the last row of the tableviews previous size. Here are the steps to produce:

1- Create a tableview with 20 rows, or else.
2- Add a line of code to add "20 more lines" when the user reaches to the last cell.
3- Scrollview is on the bottom of the screen (20th cell) and prevents tableview to scroll down further.

some strange question

this timerscroller does not work with my private navigationController(it provide some function like path2, so we can move the center view to left, right.....some function like the viewDesk project in GITHUB), sometimes there are many (about 10+) timescroller in the tableview....... this really draw me crazy.....

but when I comment below line, everything works fine.... but i don't know why......

[_tableView.superview addSubview:self]; in

  • (void)scrollViewDidEndDecelerating {

    CGRect newFrame = [_scrollBar convertRect:self.frame toView:_tableView.superview];
    self.frame = newFrame;

    // Justin, remove this line, the everything works fine with the PathNavigationController
    //[_tableView.superview addSubview:self];

    [UIView animateWithDuration:0.3f delay:1.0f options:UIViewAnimationOptionBeginFromCurrentState animations:^{
    self.alpha = 0.0f;
    self.transform = CGAffineTransformMakeTranslation(10.0f, 0.0f);
    } completion:^(BOOL finished) {

    }];

}

everything works perfect, why we need this line of code? below method also add self to the _scrollBar

  • (void)scrollViewWillBeginDragging {

    CGRect selfFrame = self.frame;
    CGRect scrollBarFrame = _scrollBar.frame;

    self.frame = CGRectMake(CGRectGetWidth(selfFrame) * -1.0f,
    (CGRectGetHeight(scrollBarFrame) / 2.0f) - (CGRectGetHeight(selfFrame) / 2.0f),
    CGRectGetWidth(selfFrame),
    CGRectGetHeight(selfFrame));

    [_scrollBar addSubview:self];

    [UIView animateWithDuration:0.2f delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState animations:^{
    self.alpha = 1.0f;
    self.transform = CGAffineTransformIdentity;
    } completion:^(BOOL finished) {

    }];

}

ARC Support

It would be very welcome if someone could post an ARC-compliant code example of TimeScroller. I can't figure out how to get it working. Thanks!

ARC Compatibility

After making the project arc compatible I have the following problem in this line:

 UIView *view = [_tableView hitTest:point withEvent:UIEventTypeTouches];

The problem: I get a compiler error saying:

implicit conversion of int to uievent* is disallowed with arc

Do you know a solution or a workaround for the problem?

TimeScroller is broken on iOS 8.1

Hey!

The TimeScroller is behaving very weird on iOS 8.1. Both on the iOS 8.1 simulators and on my iPad Mini running iOS 8.1.

It's not showing at all. Except when I scroll to the top of the screen, it pops up on the bottom of the screen and goes away immediately.

When I run my app in the iOS 7.1 simulator everything works fine.
I think this problem did not occur on iOS 8.0.*, but I'm not 100% sure and I can't test that right now.

I hope this is fixable! Good luck ;)

Kind regards,
Maarten

device orientation support & number of rows changes

Hi.
I was having problems using TimeScroller with a tableview with few rows, that depending of device orientation may or may not fill all the tableview.

I've done some quick modification to fix this problem that may be useful to others...
I'm new to git hub, don't know if there's a better way to link the code so here two dropbox links:

https://www.dropbox.com/s/d6l9wmmq9afiohf/TimeScroller.h
https://www.dropbox.com/s/00ls8ll91ijm5qd/TimeScroller.m

This will cover the rotation problem, while for the row number changes i'm now just recreating the timeScroller every (rare) tableview reloadData.

problem if the numbers of rows <10

if the numbers of rows in the tableview is too small the timeScroller didn't appear in the correct frame,to test it just change the numbersofRows to 2 for example,how can i fix that please??

CocoaPod release version out-of-date

Love this TimeScroller, thanks for making it available!

I was looking a an issue with _lastDate being null in -updateDisplayWithCell: which throws an error; I see that was resolved 10/29/12:

a593efe

Using CocoaPods, it has the current version of 1.2; I see a tag in the repo for 1.3, but this fix is after that 1.3 tag. Any chance for a most current release to include these fixes?

Thanks!
Thom

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.