NavViewController
class NavViewController : UINavigationController, PlayerViewControllerDelegate, SettingsViewControllerDelegate
This is a controller used to control the initial view
-
Player View is displayed when a
contentis tappedDeclaration
Swift
@IBOutlet var playerView: PlayerView! -
Search View will show up if you press the search button
Declaration
Swift
@IBOutlet var searchView: SearchView! -
Setting View will show up if you press the setting button
Declaration
Swift
@IBOutlet var settingsView: SettingsView! -
Login View will show up if you press the login button
Declaration
Swift
@IBOutlet var loginView: LoginView! -
The title of the page
Declaration
Swift
let titleLabel: UILabel -
Page names
Declaration
Swift
let names: [String] -
The origin point of playerview
Declaration
Swift
let hiddenOrigin: CGPoint -
The origin point of playerview after the minimized prossses is operated
Declaration
Swift
let minimizedOrigin: CGPoint -
The origin point when full screen mode
Declaration
Swift
let fullScreenOrigin: CGPoint
-
Customise View
- Setup NavigationBarButtons
- Setup TitleLable
- Setup Login View
- Setup Search View
- Setup Setting View
- Setup Notification Centre
Declaration
Swift
func customisation() -
Show Search View
Declaration
Swift
@objc func showSearch() -
Show Setting view
Declaration
Swift
@objc func showSettings() -
Show login view
Declaration
Swift
func showLogin() -
Change th title
Declaration
Swift
@objc func changeTitle(notification: Notification) -
Animate to the state of the viewController
Usage Example:
let content = NaviViewController.animatePlayView(.hidden)Declaration
Swift
func animatePlayView(toState: stateOfViewController)Parameters
toStatefullScreen,minimized,hidden -
Detect the swipe position
Declaration
Swift
func positionDuringSwipe(scaleFactor: CGFloat) -> CGPoint -
Set prefer status bar Hidden
Declaration
Swift
func setPreferStatusBarHidden(_ preferHidden: Bool) -
True if the
Contentis hiddenDeclaration
Swift
var isHidden: Bool { get set }
-
Animate
palyViewto minimiseDeclaration
Swift
func didMinimize() -
Animate to fullScreen display the playview
Declaration
Swift
func didmaximize() -
Detech if the user end swipe
Declaration
Swift
func didEndedSwipe(toState: stateOfViewController) -
Swipe to the state of view Controller
Declaration
Swift
func swipeToMinimize(translation: CGFloat, toState: stateOfViewController) -
Return the value of
isHiddenDeclaration
Swift
override var prefersStatusBarHidden: Bool { get }
-
Called after the controller's view is loaded into memory.
Declaration
Swift
override func viewDidLoad() -
Deinit
Declaration
Swift
deinit -
Notifies the view controller that its view was added to a view hierarchy.
Declaration
Swift
override func viewDidAppear(_: Bool)
NavViewController Class Reference