Skip to content

Commit

Permalink
updated readme.md, .podspec files
Browse files Browse the repository at this point in the history
  • Loading branch information
mruvim committed Feb 17, 2017
1 parent 64e86d8 commit ad7eb77
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 28 deletions.
8 changes: 4 additions & 4 deletions Example/VideoBackground.xcodeproj/project.pbxproj
Expand Up @@ -14,7 +14,7 @@
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; };
C75F411C1E568E260084B48C /* videoFirstFrame.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C75F411B1E568E260084B48C /* videoFirstFrame.jpg */; };
C75F411C1E568E260084B48C /* bg-image.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C75F411B1E568E260084B48C /* bg-image.jpg */; };
C75F411E1E568E3E0084B48C /* bg-video.mov in Resources */ = {isa = PBXBuildFile; fileRef = C75F411D1E568E3E0084B48C /* bg-video.mov */; };
C75F41211E56A8750084B48C /* UIViewExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C75F41201E56A8750084B48C /* UIViewExtensions.swift */; };
EEF921174BEBDD2987EBC03A /* Pods_VideoBackground_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F080523C8E28290D2E41458 /* Pods_VideoBackground_Example.framework */; };
Expand Down Expand Up @@ -47,7 +47,7 @@
AF1CA98993187E5010607DE3 /* VideoBackground.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = VideoBackground.podspec; path = ../VideoBackground.podspec; sourceTree = "<group>"; };
B87BB6A138E470C8FC4B6EB5 /* Pods-VideoBackground_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoBackground_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-VideoBackground_Tests/Pods-VideoBackground_Tests.debug.xcconfig"; sourceTree = "<group>"; };
C11AD1BFD6D8BF5322ECED7F /* Pods-VideoBackground_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-VideoBackground_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-VideoBackground_Tests/Pods-VideoBackground_Tests.release.xcconfig"; sourceTree = "<group>"; };
C75F411B1E568E260084B48C /* videoFirstFrame.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = videoFirstFrame.jpg; sourceTree = "<group>"; };
C75F411B1E568E260084B48C /* bg-image.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "bg-image.jpg"; sourceTree = "<group>"; };
C75F411D1E568E3E0084B48C /* bg-video.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = "bg-video.mov"; sourceTree = "<group>"; };
C75F41201E56A8750084B48C /* UIViewExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIViewExtensions.swift; sourceTree = "<group>"; };
D9549F041773F6B08CED3D6F /* Pods_VideoBackground_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_VideoBackground_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -170,7 +170,7 @@
C73B285B1E564223008AE514 /* Resources */ = {
isa = PBXGroup;
children = (
C75F411B1E568E260084B48C /* videoFirstFrame.jpg */,
C75F411B1E568E260084B48C /* bg-image.jpg */,
C75F411D1E568E3E0084B48C /* bg-video.mov */,
);
name = Resources;
Expand Down Expand Up @@ -277,7 +277,7 @@
files = (
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */,
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */,
C75F411C1E568E260084B48C /* videoFirstFrame.jpg in Resources */,
C75F411C1E568E260084B48C /* bg-image.jpg in Resources */,
C75F411E1E568E3E0084B48C /* bg-video.mov in Resources */,
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */,
);
Expand Down
2 changes: 1 addition & 1 deletion Example/VideoBackground/Base.lproj/LaunchScreen.xib
Expand Up @@ -13,7 +13,7 @@
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
<nil key="simulatedStatusBarMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
Expand Down
34 changes: 17 additions & 17 deletions Example/VideoBackground/Base.lproj/Main.storyboard
Expand Up @@ -5,7 +5,6 @@
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand All @@ -23,20 +22,20 @@
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="wa3-ti-AYR">
<rect key="frame" x="46" y="326" width="283" height="148"/>
<rect key="frame" x="30" y="317.5" width="315" height="165"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qt0-DF-cqy">
<rect key="frame" x="0.0" y="0.0" width="283" height="34"/>
<rect key="frame" x="0.0" y="0.0" width="315" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="email" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EeL-wn-Nmh">
<rect key="frame" x="0.0" y="3.5" width="40.5" height="20.5"/>
<rect key="frame" x="0.0" y="9.5" width="40.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ydF-Nv-WOw">
<rect key="frame" x="0.0" y="33" width="283" height="1"/>
<color key="backgroundColor" white="1" alpha="0.5" colorSpace="calibratedWhite"/>
<rect key="frame" x="0.0" y="39" width="315" height="1"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.25" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="51t-rN-zFx"/>
</constraints>
Expand All @@ -48,22 +47,22 @@
<constraint firstItem="EeL-wn-Nmh" firstAttribute="leading" secondItem="qt0-DF-cqy" secondAttribute="leading" id="97V-fB-7U8"/>
<constraint firstAttribute="bottom" secondItem="EeL-wn-Nmh" secondAttribute="bottom" constant="10" id="HJi-lD-ghc"/>
<constraint firstAttribute="bottom" secondItem="ydF-Nv-WOw" secondAttribute="bottom" id="Hcg-1n-0yd"/>
<constraint firstAttribute="height" constant="34" id="bUx-64-eXu"/>
<constraint firstAttribute="height" constant="40" id="bUx-64-eXu"/>
<constraint firstItem="ydF-Nv-WOw" firstAttribute="leading" secondItem="qt0-DF-cqy" secondAttribute="leading" id="z0M-eB-8NL"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wV4-2z-4jk">
<rect key="frame" x="0.0" y="44" width="283" height="34"/>
<rect key="frame" x="0.0" y="50" width="315" height="40"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="password" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BKt-VP-jmm">
<rect key="frame" x="0.0" y="3.5" width="74" height="20.5"/>
<rect key="frame" x="0.0" y="9.5" width="74" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="up8-VM-wRK">
<rect key="frame" x="0.0" y="33" width="283" height="1"/>
<color key="backgroundColor" white="1" alpha="0.5" colorSpace="calibratedWhite"/>
<rect key="frame" x="0.0" y="39" width="315" height="1"/>
<color key="backgroundColor" white="1" alpha="0.2520066352739726" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="LVd-bf-jmF"/>
</constraints>
Expand All @@ -74,20 +73,20 @@
<constraint firstAttribute="bottom" secondItem="up8-VM-wRK" secondAttribute="bottom" id="bh6-Gc-dJq"/>
<constraint firstItem="up8-VM-wRK" firstAttribute="leading" secondItem="wV4-2z-4jk" secondAttribute="leading" id="fye-8a-AeZ"/>
<constraint firstItem="BKt-VP-jmm" firstAttribute="leading" secondItem="wV4-2z-4jk" secondAttribute="leading" id="gR3-XM-Bey"/>
<constraint firstAttribute="height" constant="34" id="gnc-Xk-oLA"/>
<constraint firstAttribute="height" constant="40" id="gnc-Xk-oLA"/>
<constraint firstAttribute="bottom" secondItem="BKt-VP-jmm" secondAttribute="bottom" constant="10" id="jeG-0T-i34"/>
<constraint firstAttribute="trailing" secondItem="up8-VM-wRK" secondAttribute="trailing" id="o7c-wz-e0l"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ULD-W3-ZwU">
<rect key="frame" x="0.0" y="88" width="283" height="5"/>
<rect key="frame" x="0.0" y="100" width="315" height="10"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="5" id="BiL-W4-9rC"/>
<constraint firstAttribute="height" constant="10" id="BiL-W4-9rC"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DeZ-9a-8ko">
<rect key="frame" x="0.0" y="103" width="283" height="45"/>
<rect key="frame" x="0.0" y="120" width="315" height="45"/>
<color key="backgroundColor" red="0.9529411793" green="0.68627452850000004" blue="0.13333334029999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="Tg6-CL-xlY"/>
Expand All @@ -108,10 +107,11 @@
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="wa3-ti-AYR" firstAttribute="centerY" secondItem="kh9-bI-dsS" secondAttribute="centerY" multiplier="1.2" id="hz1-kb-cxx"/>
<constraint firstItem="wa3-ti-AYR" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leadingMargin" constant="30" id="ord-4k-Cug"/>
<constraint firstAttribute="trailingMargin" secondItem="wa3-ti-AYR" secondAttribute="trailing" constant="30" id="waQ-nR-4AY"/>
<constraint firstItem="wa3-ti-AYR" firstAttribute="leading" secondItem="kh9-bI-dsS" secondAttribute="leading" constant="30" id="ord-4k-Cug"/>
<constraint firstAttribute="trailing" secondItem="wa3-ti-AYR" secondAttribute="trailing" constant="30" id="waQ-nR-4AY"/>
</constraints>
</view>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
Expand Down
8 changes: 5 additions & 3 deletions Example/VideoBackground/ExampleController.swift
Expand Up @@ -19,12 +19,14 @@ class ExampleController: UIViewController {
private func setupVideoView() {

guard let videoPath = Bundle.main.path(forResource: "bg-video", ofType: "mov"),
let imagePath = Bundle.main.path(forResource: "videoFirstFrame", ofType: "jpg") else {
let imagePath = Bundle.main.path(forResource: "bg-image", ofType: "jpg") else {
return
}

let options = VideoOptions(pathToVideo: videoPath, pathToImage: imagePath,
isMuted: true, shouldLoop: true)
let options = VideoOptions(pathToVideo: videoPath,
pathToImage: imagePath,
isMuted: true,
shouldLoop: true)
let videoView = VideoBackground(frame: view.frame, options: options)
view.insertSubview(videoView, at: 0)
}
Expand Down
5 changes: 4 additions & 1 deletion Example/VideoBackground/Info.plist
Expand Up @@ -30,10 +30,13 @@
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
Binary file added Example/VideoBackground/bg-image.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Example/VideoBackground/bg-video.mov
Binary file not shown.
Binary file removed Example/VideoBackground/videoFirstFrame.jpg
Binary file not shown.
7 changes: 6 additions & 1 deletion README.md
@@ -1,3 +1,8 @@
# VideoBackground
Lightweight video view

![VideoBackground](http://codingroup.com/assets/external/video-background.gif)

## Installation
####CocoaPods:
Add `pod 'VideoBackground', '~> 0.1'` to Podfile and run `$ pod install`
Expand All @@ -7,7 +12,7 @@ Add `pod 'VideoBackground', '~> 0.1'` to Podfile and run `$ pod install`
Add files from `VideoBackground/Classes/*` to your project

##How to use it
Import VideoBackground where you plan to use it then add VideoBackground view as a subview
Import VideoBackground where you plan to use it then add VideoBackground as subview

```
let videoPath = Bundle.main.path(forResource: "videoFile", ofType: "mov")
Expand Down
2 changes: 1 addition & 1 deletion VideoBackground.podspec
Expand Up @@ -9,7 +9,7 @@ s.summary = "Simple button with loading animation"
s.author = { "Ruvim Miksanskiy" => "ruva@codingroup.com" }
s.source = { :git => "https://github.com/mruvim/VideoBackground.git", :tag => s.version, :branch => "master"}

s.screenshot = "http://codingroup.com/assets/external/button.gif"
s.screenshot = "http://codingroup.com/assets/external/video-background.gif"

s.platform = :ios, "9.0"
s.requires_arc = true
Expand Down

0 comments on commit ad7eb77

Please sign in to comment.