Skip to content

donbytyqi/GyroImageView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GyroImageView

Utilize your devices gyroscope to scroll through an image.

Installation

Currently, the only way to install it is manually. Simply download GyroImageView.swift file and drag and drop it to your project folder.

Usage

GyroImageView is fairly easy to implement, simply initiliaze it with a frame and set it's image. That's it.

let gyroImageView = GyroImageView(frame: UIScreen.main.bounds)

// locally set an image, think of it as a placeholder too if you download imaes :p
gyroImageView.image = UIImage(named: "test")

// download an image from a url
gyroImageView.imageUrl = ""

// set scrolling speed
gyroImageView.speed = 150.0

// left, middle or right
gyroImageView.startPoint = .middle

// allow scrolling in both X and Y axis
gyroImageView.fullScroll = true

view.addSubview(gyroImageView)

About

Utilize your devices gyroscope to scroll through an image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages