GithubHelp home page GithubHelp logo

enricoza / seekpreview Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 268 KB

Attach a SeekPreview to a seekBar to show small preview images of the seek action.

License: MIT License

Ruby 5.83% Swift 94.17%
seekbar seek avplayer preview seekpreview

seekpreview's People

Contributors

enricoza avatar

Watchers

 avatar

seekpreview's Issues

Add UI configuration

I would like to have some configuration that can be passed in the init about the UI of the Preview.

Something like:

  • Corner radius
  • Border width
  • Border color

It could be useful if we could a way to use this class from storyboard too, and maybe configure those same property via storyboard too (see IBInspectable).

Add Animators

At the moment the Animation is just an UIView.animate block used within the SeekPreview class itself.
We could have an Animator protocol injected in the class to which we can delegate the show/hide method implementations.

API could be something like:

func showPreview(_ preview: UIView, completion: (Bool) -> ()) 
func hidePreview(_ preview: UIView, completion: (Bool) -> ()) 

The preview would be already with the correct frame in this case.

Or maybe it needs to be a little more complicated (Let's think of, for example, the fact that the preview needs to be hidden at the start, when the view is created)

Maybe we can add an animated parameter that we can pass as false at the start.


We can also think to provide some default animators like:

  • fade
  • scale
  • move + scale (from bottom)?

Of course we need to be careful for the constraints and at the end of the animation we have to enforce the view position.

Maybe this can't be entirely customizable from the outside.

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.