Quote:
Originally Posted by BrianSlick
How did you arrive at that conclusion from what I said?
|
BrianSlick, your above response made me laugh
For OP:
Portrait:
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
Landscape:
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
EDIT: After rereading original question I realized that there seems to be two questions. One, the original question: set "to landscape mode by button event", and two in OP's response, which is: "There no way to restrict some views in portrait and other views in landscape?"
My above response answers the latter.