GithubHelp home page GithubHelp logo

nxtsegmentedcontrol's People

Contributors

fastred avatar pmick 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

Watchers

 avatar  avatar

nxtsegmentedcontrol's Issues

border

2016-12-15 2 59 18

Maybe you can add a border feature like this,I do it by modify your source code.
Another,I show it on a UITableViewCell,the thumb will flash to show when the cell will display.I don't know the reason,hope you can help.(my poor English...)

If you tap the unselected segment the animation is disrupted

You can fix this by starting the animation from current state like so:

- (void)_moveThumbToSelectedSegment:(NSInteger)index animated:(BOOL)animated {
    
    CGRect newSelectionRect = [self _rectForSegmentAtIndex:index];
    if (animated) {
        CGPoint fromCenter = (self.thumb.layer.presentationLayer
                              ? self.thumb.layer.presentationLayer.position
                              : self.thumb.center);
        CGPoint newCenter = [self _centerForSegmentAtIndex:index];
    
        CABasicAnimation *thumbAnimation = [self _thumbUpdateAnimationWithFromCenter:fromCenter toCenter:newCenter];
        [self.thumb.layer addAnimation:thumbAnimation forKey:@"basic"];
        self.thumb.layer.position = newCenter;
        
        CABasicAnimation *maskAnimation = [self _thumbUpdateAnimationWithFromCenter:fromCenter toCenter:newCenter];
        [self.thumbShowLayer.layer addAnimation:maskAnimation forKey:@"position"];
        self.thumbShowLayer.layer.position = newCenter;
    } else {
        [self _moveThumbToNewFrame:newSelectionRect];
    }
}

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.