Image360 1.1.5

Image360 1.1.5

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布最后发布2019年9月
SPM支持SPM

Andrew Simvolokov维护。



Image360 1.1.5

Version CocoaPods Compatible CocoaPods license Travis CI

这是什么?

Image360是一个简单的堆叠,包含Image360Controller + Image360View,允许您显示360°全景图像。

alt tag

如何使用它?

  • 在您的代码中创建一个_image360Controller的实例。
  • 将360°图像设置为新创建的实例的image: UIImage
  • 使用实例的inertia: Float设置手势的惯性。
  • 您可以通过isOrientationViewHidden: Bool标志关闭特殊的方向子视图(指南针视图)。
  • "Image360View"默认由"Image360Controller"通过手势和设备动作控制。您可以通过isDeviceMotionControlEnabled: BoolisGestureControlEnabled: Bool标志关闭这些功能。

示例

 class ViewController: UIViewController {
 
 ...
 // Image360Controller is inserted to view with container view and bind with "image360" segue
 override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
   if let identifier = segue.identifier {
   switch identifier {
     case "image360":
       if let destination = segue.destination as? Image360Controller {
         destination.image = UIImage(named: "MyPanoramicImage")
       }
     default:
       ()
     }
   }
 
 }

有关更多详细信息,请查看此存储库中的"iOS示例"。

安装

CocoaPods

CocoaPods是一个Cocoa项目的依赖管理器。您可以使用以下命令安装它:

$ gem install cocoapods

要使用CocoaPods将Image360集成到您的Xcode项目中,请在您的Podfile中指定它:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
pod 'Image360', '~> 1.1.5'
end

然后,运行以下命令

$ pod install