开发者

iPhone video play size

开发者 https://www.devze.com 2023-04-05 07:02 出处:网络
am developing a iphone app and I have a video in a uiwebview. When I press play the video p开发者_JAVA百科lays in full screen. Is there a way I can make it so when I press play the video plays in a cu

am developing a iphone app and I have a video in a uiwebview. When I press play the video p开发者_JAVA百科lays in full screen. Is there a way I can make it so when I press play the video plays in a custom size and not full screen?


yes you can make UIViewControllerSubClass that inherit from "MPMoviePlayerController" and set it size using SetFrame in the .h

-(void) setFrame:(CGRect) frame;

and in the .m

-(void) setFrame:(CGRect) frame{
    [self.view setFrame:frame];
}

so every time you use the MPMoviePlayerController you can access the setframe method such

[viewobject setframe:cgrectmake(0,0,250,400)];
0

精彩评论

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