当您进行演示时,您的指尖会显示在屏幕上。
嵌入式框架需要至少 iOS 8 的部署目标。如果您的目标是 iOS 7 的项目,必须直接在您的项目中包含 MZRPresentationKit.swift 源文件。
CocoaPods 0.36 测试版增加了对 Swift 和嵌入式框架的支持。您可以使用以下命令安装它
$ gem install cocoapods --pre
要安装它,只需将以下行添加到 Podfile 中
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod "MZRPresentationKit", '~>1.0.2'
导入 import MZRPresentationKit
并在 AppDelegate
的 application(application:didFinishLaunchingWithOptions:)
中写入以下行。
MZRPresentationView.start()
您可以像这样更改颜色和图像。您可以设置颜色或图像。
MZRPresentationView.start(UIColor.redColor(), image: UIImage(named: "YOUR-IMAGE"))
您可以像这样从应用程序中停止演示。
MZRPresentationView.stop()
Morita Naoki,[email protected],页面
MZRPresentationKit 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。