iphone - Autoresize UIScrollView -


I have created a UIViewController, which creates a UIScrollView programmatically. Everything is fine, but when I rotate the device, the size of the UIScollView should be changed so that it takes the full width of my view.

Is there any way to do this without completely rebuilding UIScrollView?

Thx a lot! Sebastian

This is called in my view deedload:

  - (zero) buildmyScroller {myScroller = [[UIScrollView alloc] initWithFrame: CGRectMake (0, 800, 768, 100)]; // ... my subcroller is adding some subviews to thumbScroller.contentSize == SGSizeMake (3000, 100); [[See self] Adsview: Mycollar]; }  

Then I tried to resize my secolar with it, when I used the set frame, I said my scroller would not answer ...:

< Pre> - (zero) change secular {UIInterfaceOrientation interfaceOrientation = self.interfaceOrientation; If (Interface Orientation == UINPfaceAuthentication Portrait) {[ThumbScroller Setframe: CGRactMake (0, 805, 768, 150)]; } And if (Interface Orientation == UINFterface Portrait Ported SideDown) {thumbScroller.frame = CGRectMake (0, 805, 768, 150); } And if (Interface Orientation == UINPface Operation Landscape Lift) {thumbScroller.frame = CGRectMake (0, 54, 9, 1024, 150); } And if (Interface Orientation == UINPfaceAuthentication LandscapeRight) {thumbScroller.frame = CGRectMake (0, 54, 9, 1024, 150); }}

And didAnimateFirstHalf is called the method ... because I'm not saying it and where to say.

Thx again a lot !!

[scrollView set frame: CGRactam (x, y, width, height)]; // You probably have to do this for scroll-weave content to fit it in your layout

It should do you can lip it in the UIAnimation block if it needs to be transitioned.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -