Skip to content

Commit

Permalink
Merge pull request hyperoslo#95 from JARMourato/master
Browse files Browse the repository at this point in the history
Changed how status bar appear/disappear
  • Loading branch information
zenangst committed Jan 20, 2016
2 parents cb33c00 + 8bfc036 commit 3c485be
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Source/ImagePickerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,8 @@ public class ImagePickerController: UIViewController {

public override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)

statusBarHidden = UIApplication.sharedApplication().statusBarHidden
UIApplication.sharedApplication().statusBarHidden = true
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: .Fade)
}

public override func viewDidAppear(animated: Bool) {
Expand All @@ -131,9 +130,13 @@ public class ImagePickerController: UIViewController {
initialContentOffset = galleryView.collectionView.contentOffset
}

public override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
UIApplication.sharedApplication().setStatusBarHidden(statusBarHidden, withAnimation: .Fade)
}

public override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
UIApplication.sharedApplication().statusBarHidden = statusBarHidden
}

// MARK: - Notifications
Expand Down

0 comments on commit 3c485be

Please sign in to comment.