-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from quanvo87/master
2.0.0
- Loading branch information
Showing
27 changed files
with
911 additions
and
554 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.DS_Store | ||
build/ | ||
xcuserdata/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<p align="center"> | ||
<img src="Assets/banner.png" width="780" title="SwiftVideoBackground"> | ||
</p> | ||
|
||
[![CocoaPods Version Status](https://img.shields.io/cocoapods/v/SwiftVideoBackground.svg)][podLink] | ||
[![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat)](https://github.com/Carthage/Carthage) | ||
[![CocoaPods](https://img.shields.io/cocoapods/dt/SwiftVideoBackground.svg)](https://cocoapods.org/pods/SwiftVideoBackground) | ||
[![CocoaPods](https://img.shields.io/cocoapods/dm/SwiftVideoBackground.svg)](https://cocoapods.org/pods/SwiftVideoBackground) | ||
![Platform](https://img.shields.io/badge/platforms-iOS-333333.svg) | ||
[![Swift](https://img.shields.io/badge/Swift-3.0+-orange.svg)](https://swift.org) | ||
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)][mitLink] | ||
|
||
<p align="center"> | ||
<img src="Assets/Spotify.gif" width="369" title="Screenshot"> | ||
</p> | ||
|
||
SwiftVideoBackground is an easy to use Swift framework that provides the ability to add a UIView of a video playing in the background to any ViewController. This provides a beautiful UI for login screens, or splash pages, as implemented by Spotify and many others. | ||
|
||
1. [Requirements](#requirements) | ||
2. [Integration](#integration) | ||
- [Cocoapods](#cocoapods) | ||
- [Carthage](#carthage) | ||
- [Manually](#manually) | ||
3. [Usage](#usage) | ||
4. [License](#license) | ||
|
||
## Requirements | ||
|
||
- Swift 3+ | ||
- iOS 8+ | ||
|
||
## Integration | ||
|
||
#### CocoaPods | ||
You can use [CocoaPods](http://cocoapods.org/) to install `SwiftVideoBackground` by adding it to your `Podfile`: | ||
|
||
For Swift 3: | ||
```ruby | ||
pod 'SwiftVideoBackground', '~> 0.06' | ||
``` | ||
|
||
#### Carthage | ||
You can use [Carthage](https://github.com/Carthage/Carthage) to install `SwiftVideoBackground` by adding it to your `Cartfile`: | ||
``` | ||
github "dingwilson/SwiftVideoBackground" | ||
``` | ||
|
||
#### Manually | ||
|
||
To use this library in your project manually you may: | ||
|
||
1. for Projects, just drag BackgroundVideo.swift to the project tree | ||
2. for Workspaces, include the whole SwiftVideoBackground.xcodeproj | ||
|
||
## Usage | ||
|
||
Import the framework into the ViewController | ||
```swift | ||
import SwiftVideoBackground | ||
``` | ||
|
||
Link a UIView within a ViewController within the Storyboard to a BackgroundVideo item, or link it programmatically. | ||
```swift | ||
var backgroundVideo : BackgroundVideo! | ||
``` | ||
|
||
Use the `createBackgroundVideo` function, with the name of the video or gif under `name`, and the file type under `type`. You can also include an alpha value between 0 and 1 under `alpha`, to adjust the brightness of the video. | ||
```swift | ||
backgroundVideo.createBackgroundVideo(name: "Background", type: "mp4") | ||
``` | ||
```swift | ||
backgroundVideo.createBackgroundVideo(name: "Background", type: "mp4", alpha: 0.5) | ||
``` | ||
|
||
Note: Make sure you have added a video file to the project, and targeted the project. Also, make sure that you have set the module to `SwiftVideoBackground` for the BackgroundVideo UIView. | ||
|
||
## License | ||
|
||
`SwiftVideoBackground` is released under an [MIT License][mitLink]. See `LICENSE` for details. | ||
|
||
**Copyright © 2016-present Wilson Ding.** | ||
|
||
*Please provide attribution, it is greatly appreciated.* | ||
|
||
[podLink]:https://cocoapods.org/pods/SwiftVideoBackground | ||
[mitLink]:http://opensource.org/licenses/MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
Pod::Spec.new do |s| | ||
s.name = "SwiftVideoBackground" | ||
s.version = "1.0.1" | ||
s.version = "2.0.0" | ||
s.summary = "An easy to use Swift framework that creates a video background for any ViewController." | ||
s.description = "SwiftVideoBackground is an easy to use Swift framework that provides the ability to add a UIView of a video playing in the background to any ViewController. This provides a beautiful user interface for use in login screens, as well as other data input screens, as modeled by Spotify's iOS App Login Screen and others" | ||
s.description = "SwiftVideoBackground is an easy to use Swift framework that provides the ability to play a video on any UIView. This provides a beautiful UI for login screens, or splash pages, as implemented by Spotify and many others" | ||
s.homepage = "https://github.com/dingwilson/SwiftVideoBackground" | ||
s.license = { :type => "MIT", :file => "LICENSE" } | ||
s.author = { "Wilson Ding" => "[email protected]" } | ||
s.author = { "Wilson Ding" => "[email protected]", | ||
"Quan Vo" => "[email protected]" } | ||
s.platform = :ios, "8.0" | ||
s.source = { :git => "https://github.com/dingwilson/SwiftVideoBackground.git", :tag => "1.0.1" } | ||
s.source = { :git => "https://github.com/dingwilson/SwiftVideoBackground.git", :tag => "2.0.0" } | ||
s.source_files = "SwiftVideoBackground", "SwiftVideoBackground/**/*.{h,m,swift}" | ||
s.exclude_files = "Classes/Exclude" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.