Giter VIP home page Giter VIP logo

Comments (11)

wtmoose avatar wtmoose commented on May 16, 2024

Are you setting any other configuration options, such as presentationContext?

from swiftmessages.

nkezhaya avatar nkezhaya commented on May 16, 2024

No, I didn't. If I pass in the current view controller, will it honor that particular controller's status bar visibility?

from swiftmessages.

nkezhaya avatar nkezhaya commented on May 16, 2024

Actually, I don't think that should matter. It should check UIApplication.sharedApplication().statusBarHidden before forcing the status bar to be visible.

from swiftmessages.

wtmoose avatar wtmoose commented on May 16, 2024

Agree 100%.

from swiftmessages.

nkezhaya avatar nkezhaya commented on May 16, 2024

Actually... it does. Strange.

https://github.com/SwiftKickMobile/SwiftMessages/blob/master/SwiftMessages/Presenter.swift#L134

This line is evaluating to true in my application, even though the status bar is clearly hidden. Could be an iOS bug? I'll dig a bit further and post in a bit.

from swiftmessages.

nkezhaya avatar nkezhaya commented on May 16, 2024

It was because of WindowViewController. Added this to the bottom of WindowViewController.swift:

override func prefersStatusBarHidden() -> Bool {
    return UIApplication.sharedApplication().statusBarHidden
}

Should I submit a pull request?

from swiftmessages.

wtmoose avatar wtmoose commented on May 16, 2024

No. I already released 1.1.4 with the same change. Thanks, though!

from swiftmessages.

wtmoose avatar wtmoose commented on May 16, 2024

Well, pod trunk push failed. Should be up in a moment.

from swiftmessages.

nkezhaya avatar nkezhaya commented on May 16, 2024

Oh wow, you were on top of that! Didn't see the commit.

Thank you!!

from swiftmessages.

wtmoose avatar wtmoose commented on May 16, 2024

πŸ‘

from swiftmessages.

yunustek avatar yunustek commented on May 16, 2024

Hi Everybody, I solved the problem with this code but it is not a very good method.
Is there a better way?

import SwiftMessages

extension WindowViewController {
	open override var prefersStatusBarHidden: Bool {
		return UIApplication.shared.topMostViewController()?.prefersStatusBarHidden ?? false
	}
}

Edit:
#16 solution is not in 7.0.0 version. Now I updated it and it is work.

from swiftmessages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.