在全屏模式下播放youtube Video时,方向会更改为横向,并且我们会更改方向.
我有一个UIView并有一个UIWebView.
在UIWebView上,我显示Youtube视频,并且可以播放.
UIView的方向设置为纵向,但是当youtube视频以全屏播放时,我们会更改方向.
它还会更改视图的方向.
但我不想将UIView的方向以及视频更改为横向.
我只希望将方向设为纵向.
同样,UIView的方向也设置为Portrait.
Hi,
I have a UIView and have a UIWebView in it.
On UIWebView i display Youtube Video and it can be played.
The Orientation of UIView is set to Portrait but when the youtube Video is played in full screen and we change the Orientation.
It Also changes the Orientation of the View.
But i dont want to change the Orientation of the UIView and also the Video to Landscape.
I Only want the orientation as Portrait.
Also the orientation of the UIView is set to the Portrait.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return NO;
}
我已经搜索过,但没有结果....
问候.
I have searched it but no results....
Regards.
尝试返回:
Try returning:
interfaceOrientation == UIInterfaceOrientationPortrait
代替
instead of
return No