Implement Auto Rotate in Auto Scroll sample source by xCode and Objective-C

SDK:    xCode 3.2
Device: iPhone 3GS

      How to modify the sample source (2_Autoscroll) to let both UIView and the UIImage in the view rotate correctly while have iPhone rotate event?

      Please find the 2_Autoscroll source code in:

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, you just have to add to the UIViewController this code:

   return YES;

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
agicfutureAuthor Commented:
Thanks. I added it and work. Thanks. However, seem need to set the uiscrollview and image width...etc as the Image width not match the rotated screen
You can set auto re-size mask to controls.
Sample code for UIImageView imgView:
[imgView setAutoresizingMask:(UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin)];

Open in new window

Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

agicfutureAuthor Commented:
Thanks. I will try it
agicfutureAuthor Commented:
Thanks. I will close this case.

Please kindly help on below question.
agicfutureAuthor Commented:
Thanks.  Please kindly help on below question too.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.