开发者

UIActivityindicatorView in MPMoviePlayerController

开发者 https://www.devze.com 2023-04-08 21:28 出处:网络
I am downloading videos and playingwith MPMoviePlayercontroller, i want to display uiactivityindica开发者_开发问答torview in mpmovieplayercontroller while video is being downloaded as in YouTube app.

I am downloading videos and playing with MPMoviePlayercontroller, i want to display uiactivityindica开发者_开发问答torview in mpmovieplayercontroller while video is being downloaded as in YouTube app. How can i achieve that?


Something like this?:

UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
activityIndicator.center = myMPMoviePlayercontroller.center;
activityIndicator.hidesWhenStopped = YES;
[activityIndicator startAnimating];
[myMPMoviePlayercontroller.view addSubview:activityIndicator];
myMPMoviePlayercontroller addSubview:activityIndicator];

See the UIActivityIndicatorView Class Reference for more info.

0

精彩评论

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

关注公众号