Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some strange question #9

Closed
flypigz opened this issue Mar 22, 2012 · 2 comments
Closed

some strange question #9

flypigz opened this issue Mar 22, 2012 · 2 comments

Comments

@flypigz
Copy link

flypigz commented Mar 22, 2012

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) {

    }];

}

@andrewroycarter
Copy link
Owner

That's internesting... If you can post an example project that demonstrates this behavior I'll check it out!

@flypigz
Copy link
Author

flypigz commented Apr 25, 2012

just close it...

@flypigz flypigz closed this as completed Apr 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants