TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Nov 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Michael Mork.
Spread cheer and stereoscopic anthropomorphism in all screen orientations. Demonstrate the power of Apple’s abstractions provided by UIKit, CALayer, and CoreMotion to your mobile team.
Pretty standard, really.
let leftEye = GooglyEye(frame: CGRect(x: 30, y: 300, width: 100, height: 100))
myAppsview.addSubview(leftEye)
If you want a 3-D effect, consider the mode property, which defaults to .performant. Setting it to .immersive enables pitch and roll on the ‘sheen’ which 'encloses’ the pupil view.
leftEye.mode = .immersive
Make adjustments to the pupil width as a percentage of its respective sclera’s diameter.
leftEye.pupilDiameterPercentageWidth = 0.6
If your app has an existing instance of CMMotionManager, be certain to set your app’s instance of it on the MotionProvider class before allocationg any GooglyEyes like so:
MotionProvider.shared.coreMotionManager = myAppsMotionManager
//.. create GooglyEyes
To run the example project, clone the repo, and run pod install
from the Example directory first.
iOS 9.0
googlyeyes is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "googlyeyes"
Michael Mork, [email protected] Email me!
googlyeyes is available under the MIT license. See the LICENSE file for more info.