VideoSplash 1.0.9

VideoSplash 1.0.9

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最新发布2015年11月
SPM支持 SPM

Toygar Dundaralp 维护。



VideoSplash - 基于视频的 UIViewController

alt tag

简介

需要 iOS 8 或更高版本和 Xcode 6.1+
Swift 支持使用动态框架,因此仅在 iOS > 8 时受支持。

安装

要通过 CocoaPods 安装,请将以下行添加到您的 Podfile 中。

use_frameworks!

并且

pod "VideoSplash"

然后,运行以下命令

$ pod install

使用

import VideoSplash

class ViewController: VideoSplashViewController {

  override func viewDidLoad() {
    super.viewDidLoad()
    let url = NSURL.fileURLWithPath(NSBundle.mainBundle().pathForResource("test", ofType: "mp4")!)
    self.videoFrame = view.frame
    self.fillMode = .ResizeAspectFill
    self.alwaysRepeat = true
    self.sound = true
    self.startTime = 12.0
    self.duration = 4.0
    self.alpha = 0.7
    self.backgroundColor = UIColor.blackColor()
    self.contentURL = url
    self.restartForeground = true
  }
}