Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

MotionOrientation

The notify the orientation of iOS device changed, using CoreMotion for even taking the orientation in 'Orientation Lock'.

Requirements

  • Xcode
  • Swift 4.1

Usage

Run below line for Start motion manager

YZMotionOrientationManager.shared.startAccelerometerUpdates(deviceBlock: { (deviceOrientation) in
// code 
}) { (interfacOrientation) in
// code 
}

You will get device orientation and interface orientation using block.

Run below line for stop motion manager

YZMotionOrientationManager.shared.stopAccelerometerUpdates()

About

The notify the orientation of iOS device changed, using CoreMotion for even taking the orientation in 'Orientation Lock'.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages