Coder Social home page Coder Social logo

giangthai1294 / tfswipeshrink Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tfrank64/tfswipeshrink

0.0 1.0 0.0 27.22 MB

UIView minimizing component similar to the YouTube mobile app.

License: MIT License

Objective-C 53.69% Swift 46.31%

tfswipeshrink's Introduction

Build Status TFSwipeShrink

A UIView subclass that mimics the video player panning in the current YouTube iOS and Android apps.

Example

Screenshot

Installation

Copy the TFSwipeShrinkView.swift file into your Xcode project and you are ready.

Usage

View ExampleViewController.swift to see an example of adding a video on top of a TFSwipeShrinkView.

  1. Create a UIView in storyboard giving it a custom class of TFSwipeShrinkView. I suggest placing it at the top of your viewcontroller just as the YouTube app does.
  2. In the viewcontroller implementing your TFSwipeShrinkView, within the viewDidAppear method call the configureSizeAndPosition(parentViewFrame: CGRect) on your swipe shrink object.

From here, everything should just work. It is up to you the developer to add whatever you want on top of the swipe shrink view, such as a video or an image. In it's default state, you should have something that looks like this.

Screenshot

Author

Created by Taylor Franklin (tfrank64)

TODO

  • Create a secondary view below shrink view, similar to YouTube app.

Contributing

Feel free to fork the repo and open a pull request. Using fairly normal convention, make changes in your forked repo, then submit a pull request.

To view some of the original Objective-C code for this project, check out the ObjCSwipeShrink directory.

License

TFSwipeShrink is licensed under the MIT license.

tfswipeshrink's People

Contributors

tfrank64 avatar andreividrasco avatar lpmi-13 avatar

Watchers

James Cloos avatar

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.