Skip to content

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

Notifications You must be signed in to change notification settings

yudiz-solutions/MotionOrientationDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages