|ReleasedLast Release||Feb 2016|
Maintained by Mohssen.
To run the example project, clone the repo, and run
pod install from the Example directory first.
CameraLevel is a UIView subclass. It can be create with initWithFrame or in Interface Builder
To start and stop the camera receiving accelerometer data, use:
[self.cameraLevel start]; [self.cameraLevel stop];
By default the level sets it's vertical center (for pitch) at the position where the phone is perpendicular to the ground. To set the default center to the devices current position, call:
There are a few customizable options for the level: The pitch indicator lines:
self.cameraLevel.lineWidth = 2.0f; self.cameraLevel.lineColor = [UIColor redColor];
The outer and inner circles:
self.cameraLevel.circleWidth = 1.0f; self.cameraLevel.circleColor = [UIColor greenColor];
The tick marks along the outer circle:
self.cameraLevel.tickWidth = 4.0f; self.cameraLevel.tickColor = [UIColor orange];
To apply changes made to the levels properties you must call:
CameraLevel is available through CocoaPods. To install it, simply add the following line to your Podfile:
Mohssen Fathi, [email protected]
CameraLevel is available under the MIT license. See the LICENSE file for more info.