i am working with ipad. in my project, it need to see in portrait, not landscape. Now if i turn my ipad, my project as well changing to landscape mode.
But what i need is, if anyone turn they ipad also, my page view should not turn into landscape. than mean always my web开发者_如何学运维 page should be in portrait mode. for this how can i stop the orientation change?
and make my web view always in portrait?
any one help me?
You want to implement shouldAutorotateToInterfaceOrientation
like this:
- (BOOL) shouldAutorotateToInterfaceOrientation:(UIDeviceOriention)orientation{
if(orientation == UIInterfaceOrientationPortrait){
return YES;
}
return NO;
}
精彩评论