Skip to content

Commit

Permalink
Merge pull request #164 from AndriyGo/master
Browse files Browse the repository at this point in the history
Adds ability to customize statusBarStyle
  • Loading branch information
ephread authored May 29, 2018
2 parents 9a78bfc + d81b426 commit 6ec038e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ class CoachMarksViewController: UIViewController {

///
weak var delegate: CoachMarksViewControllerDelegate?

///
var statusBarStyle:UIStatusBarStyle = .default

///
override var preferredStatusBarStyle : UIStatusBarStyle {
return statusBarStyle
}

// MARK: - Private properties
fileprivate var onGoingSizeChange = false
Expand All @@ -100,7 +108,6 @@ class CoachMarksViewController: UIViewController {
fileprivate var _shouldAutorotate: Bool = true
fileprivate var _prefersStatusBarHidden: Bool = false
fileprivate var _supportedInterfaceOrientations: UIInterfaceOrientationMask = [.portrait]

// MARK: - Lifecycle
convenience init(coachMarkDisplayManager: CoachMarkDisplayManager,
skipViewDisplayManager: SkipViewDisplayManager) {
Expand Down
11 changes: 11 additions & 0 deletions Sources/Instructions/Core/Public/CoachMarksController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ public class CoachMarksController {
/// be called at various points.
public weak var delegate: CoachMarksControllerDelegate?

/// Controls the style of the status bar when coach marks are displayed
public var statusBarStyle:UIStatusBarStyle {
set(value) {
coachMarksViewController.statusBarStyle = value
coachMarksViewController.setNeedsStatusBarAppearanceUpdate()
}
get {
return coachMarksViewController.statusBarStyle
}
}

/// Hide the UI.
fileprivate(set) public lazy var overlay: OverlayManager = {
let overlay = OverlayManager()
Expand Down

0 comments on commit 6ec038e

Please sign in to comment.