Your rootView's size used to be (320, 480) for example, after rotating, you should set it to (480, 320) in order to fit the screen in landscape mode, that's why you need to change the bounds of your view.
Your rootView's size used to be (320, 480) for example, after rotating, you should set it to (480, 320) in order to fit the screen in landscape mode, that's why you need to change the bounds of your view. Set the transform is making the view actually rotate 90 degrees. UIKit is doing the similar things when automatically rotate for you.
– Janaka Aug 19 at 5:01 yes. Normally, the root view should always be the same size as the screen. – xuzhe Aug 19 at 5:07 @Janaka If you think the answer did help, vote up & accept is very appreciate.
– xuzhe Aug 23 at 3:30.
You will try this code. Take a look at the function `shouldAutorotateToInterfaceOrientation`: in the UIViewController class. This function returns YES if the orientations is supported by your UIView.
If you return YES only to the landscape orientation, then the iPhone will automatically be put in that orientation. The following code should do it. Put it in the UIViewController that controls the view that you want to put in landscape mode.
Use this Method. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationLandscape); } Try this link its definitely help you this.
I want the view to be permanently in landscape mode. I don’t want it to be change based on device. – Janaka Aug 19 at 13:42 edit in my code – Nikunj R.
Jadav Aug 20 at 4:42.
Define degreesToRadians(x) (M_PI * x / 180.0) - (void)viewWillAppear:(BOOL)animated { UIApplication sharedApplication setStatusBarOrientation:UIInterfaceOrientationLandscapeRight; CGRect newBounds = CGRectMake(0, 0, 480, 320); self. NavigationController.view. Bounds = newBounds; self.
NavigationController.view. Center = CGPointMake(newBounds.size. Height / 2.0, newBounds.size.
Width / 2.0); self. NavigationController.view. Transform = CGAffineTransformMakeRotation(degreesToRadians(90)); super viewWillAppear:animated; } - (void)viewWillDisappear:(BOOL)animated { self.
NavigationController.view. Transform = CGAffineTransformIdentity; self. NavigationController.view.
Transform = CGAffineTransformMakeRotation(degreesToRadians(0)); self. NavigationController.view. Bounds = CGRectMake(0.0, 0.0, 320.0, 480.0); super viewWillDisappear:animated; }.
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.