开发者

how can i stop the orientation change in iPad?

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜