jamonholmgren / ProMotion

ProMotion is a RubyMotion gem that makes iPhone development less like Objective-C and more like Ruby.
MIT License
1.26k stars 147 forks source link

Hide status bar not working #674

Closed poc7667 closed 9 years ago

poc7667 commented 9 years ago

Rake file

I use promotion in my app.

Applied the following settings, but the status bar still shows on my screen

app_delegate.rb

class AppDelegate < PM::Delegate
  status_bar false

Rakefile

  app.info_plist['UIStatusBarHidden'] = true
  app.info_plist['UIViewControllerBasedStatusBarAppearance'] = false
  app.info_plist["UIStatusBarStyle"] = "UIStatusBarStyleLightContent"

Bundle list

% bundle list                                                                                                                 (git)-[feature/add-init-view]
Gems included by the bundle:
* ProMotion (2.3.0)
* activesupport (4.2.1)
* afmotion (2.5)
* awesome_print_motion (0.1.0)
* bubble-wrap (1.3.0)
* bundler (1.7.5)
* claide (0.8.1)
* cocoapods (0.36.3)
* cocoapods-core (0.36.3)
* cocoapods-downloader (0.9.0)
* cocoapods-plugins (0.4.2)
* cocoapods-trunk (0.6.0)
* cocoapods-try (0.4.3)
* colored (1.2)
* dbt (1.1.5)
* escape (0.0.4)
* fuzzy_match (2.0.4)
* i18n (0.7.0)
* json (1.8.2)
* methadone (1.9.0)
* minitest (5.6.0)
* molinillo (0.2.3)
* motion-cocoapods (1.7.0)
* motion-kit (0.17.0)
* motion-require (0.2.0)
* nap (0.8.0)
* netrc (0.7.8)
* open4 (1.3.4)
* rake (10.4.2)
* sugarcube (1.7.0)
* thread_safe (0.3.5)
* tzinfo (1.2.2)
* xcodeproj (0.23.1)
jamonholmgren commented 9 years ago

Hey @poc7667 ! Can you try the branch in #670 to see if that fixes anything?

jiajiawang commented 9 years ago

I'm having the same problem. Still can't hide status_bar. I'm using ProMotion 2.4.2.

jamonholmgren commented 9 years ago

@carlinisaacson , would you mind looking at this sometime?

carlinisaacson commented 9 years ago

@jiajiawang I looked into this and the way we are setting status bar to hidden in the app delegate doesn't appear to be working correctly. We will have to dig into this more.

In the meantime, you can hide the status bar on the screen itself by:

Rakefile:

app.info_plist["UIViewControllerBasedStatusBarAppearance"] = false

Screen:

class MyScreen < PM::Screen
  title "My Screen"
  status_bar :none
end
jiajiawang commented 9 years ago

@carlinisaacson It works. Thank you for your help.

carlinisaacson commented 9 years ago

No problem.

I looked into the issue with hiding it in the app delegate and found that even though we set it to hidden in the app delegate the screen is defaulting to show the status bar if you don't call status_bar in your screen.

We can probably tell it to default to show unless it is already hidden.

Also I found that setting

app.info_plist['UIStatusBarHidden'] = true

in the rakefile will hide it on the splash screen as well. Setting status_bar false won't.