Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-01-2009, 05:20 PM   #1 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 2
Default Adding rotation to PageControl

The UI of my application is very similar to the PageControl example. Upon implementing it, I ran into an issue where I cannot get the rotation events. I then went to the PageControl example and just tried to add the rotation method to it. The example is: iPhone Dev Center

I go to the view and add:

-(BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
returnYES;
}

And set a breakpoint. It never gets called.
The way that this sample works is you have the window, and on the window is a scrollview. As you swipe your finger across the screen, the view is updated with different colors, graphics and text. I tried adding this method to the window, scrollview and view, all to no avail.
I think the right place to put it is the scrollview (the one that encapsulates the swiping view), and am using the following method:

-(BOOL)scrollViewUIScrollView*)scrollView shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
returnYES;
}

So, first of all, is this the correct place to put this in the PageControl example? If so, is this the right signature for the method?
Thanks.
pbshoe is offline   Reply With Quote
Old 04-01-2009, 09:22 PM   #2 (permalink)
New Member
 
Join Date: Apr 2009
Posts: 2
Default

Quote:
Originally Posted by pbshoe View Post
The UI of my application is very similar to the PageControl example. Upon implementing it, I ran into an issue where I cannot get the rotation events. I then went to the PageControl example and just tried to add the rotation method to it. The example is: iPhone Dev Center

I go to the view and add:

-(BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
returnYES;
}

And set a breakpoint. It never gets called.
The way that this sample works is you have the window, and on the window is a scrollview. As you swipe your finger across the screen, the view is updated with different colors, graphics and text. I tried adding this method to the window, scrollview and view, all to no avail.
I think the right place to put it is the scrollview (the one that encapsulates the swiping view), and am using the following method:

-(BOOL)scrollViewUIScrollView*)scrollView shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
returnYES;
}

So, first of all, is this the correct place to put this in the PageControl example? If so, is this the right signature for the method?
Thanks.
I am also having this exact same issue... has anyone figured out what the deal is? You can download the PageControl example from here Sign in with your Apple ID - Apple Developer Connection
RichKingy is offline   Reply With Quote
Old 07-17-2009, 05:08 AM   #3 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 50
Default

try this delegate method in your myviewcontroller

- (BOOL)shouldAutorotateToInterfaceOrientationUIIn terfaceOrientation)interfaceOrientation {
return YES;
}

or put it in each class
rahulvyas is offline   Reply With Quote
Old 06-30-2010, 12:38 PM   #4 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 3
Default Same issue

Hi guys I'm having the exact same issue! Does someone have a solution to it?

THanks
isaacueca is offline   Reply With Quote
Old 07-01-2010, 12:38 AM   #5 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 50
Default

Quote:
Originally Posted by isaacueca View Post
Hi guys I'm having the exact same issue! Does someone have a solution to it?

THanks
the rotation method is for viewController not for view so make sure you are implementing the method in the view controller where your scrollView+Page Controller is added
rahulvyas is offline   Reply With Quote
Reply

Bookmarks

Tags
landscape, pagecontrol, rotation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 235
16 members and 219 guests
@sandris, ADY, Alsahir, dacapo, Dani77, djohnson, HemiMG, jansan, JasonR, MarkC, mer10, prchn4christ, ryandb2, smethorst, tomtom100
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:00 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0