Saturday, January 4, 2014

I want to develop a lateral view of the program, but only displays the vertical

I want to develop a program that only transverse view .. That no matter what kind of phone is rotated to landscape view ...
Now there is a problem when the program is started, the show is vertical, and the format of confusion badly. Did not know how to display the lateral view.
I would like to ask, how to achieve this demand, I just need to landscape display my application.
Or tell me which method to call or set a startup program that allows landscape view ..
Reply:
http://www.cocoachina.com/bbs/read.php?tid-36522-keyword-% BA% E1% C6% C1.html

First there is the problem better search cocoachina
Reply:
Oh, thank you. I also find the answer cocoachina it.
PS: csdn administrators who hear you say will be very sad drops ~

I also posted the answers come.
Each viewcontroller which are using this

- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation {
/ / Overriden to allow any orientation.

return UIInterfaceOrientationIsLandscape (interfaceOrientation);

}

More detailed and systematic description, see here.
http://developer.apple.com/library/ios/ # documentation / General / Conceptual / iPadProgrammingGuide / CoreApplication / CoreApplication.html

Here are the answers to copy upstairs.
/ / Override to allow orientations other than the default portrait orientation.
- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation {
/ / Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
or

UIInterfaceOrientationLandscapeRight


cited a floor ww2000e reply:
http://www.cocoachina.com/bbs/read.php?tid-36522-keyword-% BA% E1% C6% C1.html

Problems first search cocoachina better

No comments:

Post a Comment