Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tom Coomer
1,331 PointsRotate view with device
I was wondering how I would rotate the view on the iPhone as the user tilts the device using the gyro or accelerometer. I am unable to find a tutorial but am not sure what I should be searching for.
4 Answers
Andrew Chalkley
Treehouse Guest TeacherHey Tom Coomer,
I've put a little video for you together to rotate a view using accelerometers.
Here's the project in the initial state and this is the finished project.
Generally when working with transformations / angles in computing you have to use radians. All you need to remember is 360 degrees is equal to 2 Pi.
Hope this helps!
Regards,
Andrew
Ignacio Opazo
8,950 PointsNice work, very helpfull
Ben Blackmore
7,309 PointsYou guys rock <3
David Klein
Courses Plus Student 1,456 PointsDavid Klein
Courses Plus Student 1,456 Pointsthanks Andrew Chalkley .
Tom Coomer
1,331 PointsTom Coomer
1,331 PointsThat's excellent! Thank you very much!