2013-03-20 9 views
5

Sto cercando di rimuovere la barra di stato nel mio progetto xcode iOS. versione di PhoneGap 2.5. Ive ha provato il seguente.cant hide statusbar in ios utilizzando xcode phonegap

1) la rimozione di stato da progetti specifici PhoneGap aggiungendo la seguente riga al file config.xml

<preference name="fullscreen" value="true" /> 

questo è il mio file xml.

<?xml version="1.0" encoding="UTF-8"?> 
    <widget> 
    <preference name="KeyboardDisplayRequiresUserAction" value="true" /> 
    <preference name="SuppressesIncrementalRendering" value="false" /> 
    <preference name="UIWebViewBounce" value="false" /> 
    <preference name="TopActivityIndicator" value="gray" /> 
    <preference name="EnableLocation" value="false" /> 
    <preference name="EnableViewportScale" value="true" /> 
    <preference name="AutoHideSplashScreen" value="true" /> 
    <preference name="ShowSplashScreenSpinner" value="false" /> 
    <preference name="FadeSplashScreen" value="true" /> 
    <preference name="FadeSplashScreenDuration" value=".25" /> 
    <preference name="MediaPlaybackRequiresUserAction" value="false" /> 
    <preference name="AllowInlineMediaPlayback" value="false" /> 
    <preference name="BackupWebStorage" value="cloud" /> 
    <preference name="fullscreen" value="true" /> 

    <content src="index.html" /> 

    <plugins> 
     <plugin name="Device" value="CDVDevice" /> 
     <plugin name="Logger" value="CDVLogger" /> 
     <plugin name="Compass" value="CDVLocation" /> 
     <plugin name="Accelerometer" value="CDVAccelerometer" /> 
     <plugin name="Camera" value="CDVCamera" /> 
     <plugin name="NetworkStatus" value="CDVConnection" /> 
     <plugin name="Contacts" value="CDVContacts" /> 
     <plugin name="Debug Console" value="CDVDebugConsole" /> 
     <plugin name="Echo" value="CDVEcho" /> 
     <plugin name="File" value="CDVFile" /> 
     <plugin name="FileTransfer" value="CDVFileTransfer" /> 
     <plugin name="Geolocation" value="CDVLocation" /> 
     <plugin name="Notification" value="CDVNotification" /> 
     <plugin name="Media" value="CDVSound" /> 
     <plugin name="Capture" value="CDVCapture" /> 
     <plugin name="SplashScreen" value="CDVSplashScreen" /> 
     <plugin name="Battery" value="CDVBattery" /> 
     <plugin name="Globalization" value="CDVGlobalization" /> 
     <plugin name="InAppBrowser" value="CDVInAppBrowser" /> 
    </plugins> 

    <access origin="*" /> 
</widget> 

prova

ive hanno anche questo aggiunto al mio file plist. Questo dovrebbe rimuovere la barra di stato per specifiche app iOS.

<key>[UIApplication sharedApplication].statusBarHidden = YES;</key> 

codice:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
<plist version="1.0"> 
<dict> 
    <key>CFBundleIcons</key> 
    <dict> 
     <key>CFBundlePrimaryIcon</key> 
     <dict> 
      <key>CFBundleIconFiles</key> 
      <array> 
       <string>icon.png</string> 
       <string>[email protected]</string> 
       <string>icon-72.png</string> 
       <string>[email protected]</string> 
      </array> 
      <key>UIPrerenderedIcon</key> 
      <false/> 
     </dict> 
    </dict> 
    <key>UISupportedInterfaceOrientations~ipad</key> 
    <array> 
     <string>UIInterfaceOrientationPortrait</string> 
     <string>UIInterfaceOrientationLandscapeLeft</string> 
     <string>UIInterfaceOrientationPortraitUpsideDown</string> 
     <string>UIInterfaceOrientationLandscapeRight</string> 
    </array> 
    <key>UISupportedInterfaceOrientations</key> 
    <array> 
     <string>UIInterfaceOrientationPortrait</string> 
    </array> 
    <key>CFBundleDevelopmentRegion</key> 
    <string>English</string> 
    <key>CFBundleDisplayName</key> 
    <string>${PRODUCT_NAME}</string> 
    <key>CFBundleExecutable</key> 
    <string>${EXECUTABLE_NAME}</string> 
    <key>CFBundleIconFile</key> 
    <string>icon.png</string> 
    <key>CFBundleIdentifier</key> 
    <string>org.apache.cordova.HelloWorld</string> 
    <key>CFBundleInfoDictionaryVersion</key> 
    <string>6.0</string> 
    <key>CFBundleName</key> 
    <string>${PRODUCT_NAME}</string> 
    <key>CFBundlePackageType</key> 
    <string>APPL</string> 
    <key>CFBundleSignature</key> 
    <string>????</string> 
    <key>CFBundleVersion</key> 
    <string>1.0</string> 
    <key>LSRequiresIPhoneOS</key> 
    <true/> 
    <key>NSMainNibFile</key> 
    <string></string> 
    <key>[UIApplication sharedApplication].statusBarHidden = YES;</key> 
    <string>YES</string> 
    <key>NSMainNibFile~ipad</key> 
    <string></string> 
</dict> 
</plist> 

Perché è niente di tutto questo lavoro ??

+0

Prova questo: http://stackoverflow.com/a/20152984/1856577 Testato con PhoneGap 1.9. – zilongqiu

risposta

3

ho risolto questo finalmente ..! Sono entrato nelle proprietà del progetto facendo clic sul progetto. sotto target/yourProject c'era un menu della barra di stato. Ho selezionato la barra di stato: nero traslucido che lo ha riparato.

4

OP è corretto il 99%, ma avete solo bisogno di spuntare la "Nascondi durante l'avvio di applicazioni" scatola

Questo è dove a trovarlo:

Selezionare Navigatore progetto (icona della cartella nella barra laterale)

Selezionare il progetto principale (quello con il nome del progetto)

Poi nel menu principale, evidenziare la scheda Riepilogo, scorrere fino a "barra di stato"

Problemi correlati