Rotation Handling

For Apple specific issues

Rotation Handling

Postby StagiaireINA » Tue May 29, 2012 5:25 pm

Is there a way to catch and handle the rotation of a device using JUCE? I'd just wish to repaint and change the size of some components of my app when the orientation changes.

Thank you
StagiaireINA
JUCE Geek
 
Posts: 31
Joined: Wed Mar 07, 2012 3:28 pm

Re: Rotation Handling

Postby symfonysid » Tue May 29, 2012 6:22 pm

resized() is called when a device rotates.
User avatar
symfonysid
JUCE Obsessive
 
Posts: 80
Joined: Tue Sep 23, 2008 5:06 pm

Re: Rotation Handling

Postby StagiaireINA » Wed May 30, 2012 10:23 am

That's what I thought but when I put breakpoints on resized(), it doesn't stop the program when I rotate the Ipad (yes, breakpoints are activated and it runs in Debug mode). To be sure, I wrote: Logger::outputDebugString("resized called"); in the function and again, nothing is written when I rotate the device.
StagiaireINA
JUCE Geek
 
Posts: 31
Joined: Wed Mar 07, 2012 3:28 pm

Re: Rotation Handling

Postby jules » Wed May 30, 2012 10:54 am

Unless your screen is square, then your component will definitely be resized, and resized() is always called when things resize.

Maybe check for silly mistakes like checking the resized() of the wrong component?
User avatar
jules
Fearless Leader
 
Posts: 17218
Joined: Mon Sep 06, 2004 9:03 am
Location: London, UK

Re: Rotation Handling

Postby StagiaireINA » Wed May 30, 2012 3:59 pm

Well you were right, my bad!
Thanks again
StagiaireINA
JUCE Geek
 
Posts: 31
Joined: Wed Mar 07, 2012 3:28 pm


Return to MacOSX and iOS

Who is online

Users browsing this forum: No registered users and 2 guests