Classes
The following classes are available globally.
-
This gives us a class to use for custom segues.
Declaration
Swift
@MainActor open class SwipeTabSegue : UIStoryboardSegue
-
This is a class that conforms to the
See moreLGV_SwipeTabViewControllerType
protocol, and is also a basicUIViewController
.Declaration
Swift
@MainActor open class LGV_SwipeTab_Base_ViewController : UIViewController, LGV_SwipeTabViewControllerType
-
This implements an instance of a
UIPageViewController
, as well as aUIToolbar
instance. The toolbar acts in the same manner as aUITabBar
, and is displayed either below (default), or above the page view controller.The page view controller provides the “swipe” action, and the toolbar provides the “tab bar” action.
This results in behavior like Android. In Android, you can swipe between tabs, as well as select them directly.
You can have the “tab bar” displayed above the page, as in Android, or below (default), as in iOS.
This is a lot more limited than a real
UITabBarController
, but it should be useful for most implementations. You do have access to both the page view controller, and the toolbar, if you want to do more customization.It will allow you to propagate a navigation controller, applied to the container, into internal views. That’s always an annoying issue with
See moreUITabBarController
. You need to remember that the tab controller is hosting the navigation bar; not your embedded controller.Declaration
Swift
@IBDesignable @MainActor open class LGV_SwipeTabViewController : UIViewController
extension LGV_SwipeTabViewController: UIPageViewControllerDataSource
extension LGV_SwipeTabViewController: UIPageViewControllerDelegate