ContentOffset in UIScrollView after rotation of iPhone?

Here is one way to do this: For the scrollview set.

Here is one way to do this: For the scrollview set scrollView. AutoresizingMask =(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight); scrollView. ContentMode = UIViewContentModeTopRight; The UIViewContentModeTopRight mode will keep the upper left corner at coordinate (0,0) even if the rotation behaviour is not correct.To get the same rotation behaviour as in UIViewContentModeCenter add scrollView.

ContentOffset = fix(sv. ContentOffset, currentOrientation, goalOrientation); into willAnimateRotationToInterfaceOrientation. Fix is the function CGPoint fix(CGPoint offset, UIInterfaceOrientation currentOrientation, UIInterfaceOrientation goalOrientation) { CGFloat xx = offset.

X; CGFloat yy = offset. Y; CGPoint result; if (UIInterfaceOrientationIsLandscape(currentOrientation)) { if (UIInterfaceOrientationIsLandscape(goalOrientation)) { // landscape -> landscape result = CGPointMake(xx, yy); } else { // landscape -> portrait result = CGPointMake(xx+80, yy-80); } } else { if (UIInterfaceOrientationIsLandscape(goalOrientation)) { // portrait -> landscape result = CGPointMake(xx-80, yy+80); } else { // portrait -> portrait result = CGPointMake(xx, yy); } } return result; } The above code will make the scrollview rotate around the center of the screen and also ensure that the upper left corder is always are coordinates (0,0).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions