0

Can I use buttons in a tab bar or similar to play different video clips like this, Movie Player in Swift and how would I do that, a video array or ??

Community
  • 1
  • 1

1 Answers1

0

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/

Michael Voznesensky
  • 1,612
  • 12
  • 15