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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-01-2009, 04:20 PM   #1 (permalink)
pbshoe
New Member
 
Join Date: Jan 2009
Posts: 2
pbshoe is on a distinguished road
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
 

» Advertisements
» Online Users: 448
16 members and 432 guests
apatsufas, brainspoon, buenasuerte, CMSLdesign, Dimpleppanchal, dre, Evilelement, Gaz, iOS.Lover, ketaskin, Kieren Harrold, LegionMD, MAMN84, MysticLine, Robiwan, Sami Gh
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,614
Threads: 94,086
Posts: 402,793
Top Poster: BrianSlick (7,990)
Welcome to our newest member, kurtroom
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:45 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.