Skip to content

Commit

Permalink
Merge pull request ephread#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 44b817a + e0406d4 commit 7840e1d
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 7840e1d

Please sign in to comment.