0

I'm creating app for ios, I'm currently working in camera.I like to draw the balance or straightening the image with a filter, the balance filter should move along the angle of the phone to ensure the phone is in prefect straight. I imported the GPUImage for creating filters.I would like to share the image of the filter which I need the same to done in my project. This is the image

developer
  • 3
  • 7
  • What are your questions? – El Tomato Apr 06 '16 at 21:49
  • @EITomato-Thanks for your reply. I'm a new bee, I want a leveling to be append on my camera preview.The purpose of this filter is to ensure the phone is in correct angle.This filter is used in VSCO cam app – developer Apr 12 '16 at 19:18
  • @EITomato - can I achieve this with gryoscope? I need the line to be append on my camera to find in which angle my phone is titled. – developer Apr 23 '16 at 17:00

1 Answers1

0

You will want to use the CMMotionManager to get accelerometer data, which will tell you the angle of the phone. Use that angle to apply a transform to your UIView.

Ric Santos
  • 15,419
  • 6
  • 50
  • 75