简体   繁体   中英

play multiple videos in xcode swift

我可以使用标签栏中的按钮或类似按钮来播放不同的视频片段吗,像Swift中的Movie Player以及视频数组或???

Yes, you can use buttons in a tab bar, but that is not a great tab-bar experience. Nevertheless... a simple design would have

ViewControllers 0 - n

for every controller from 0 - n, a tab on the bar.

Every controller subclasses a BaseVideoViewController that takes a parameter of a video url (local or network) and plays it on viewdidappear/viewwillappear, and hides it on viewdiddissapear.

If you want to have it work without specific viewcontrollers, create a delegate for your UITabBar

https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITabBarDelegate_Protocol/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM