arnaucube
arnaucube/commonroutesServerPublic Self-hosted repository
commonroutesServer/www/plugins/cordova-plugin-statusbar/doc/es/index.md
www/plugins/cordova-plugin-statusbar/doc/es/index.mdRaw
  1<!---
  2    Licensed to the Apache Software Foundation (ASF) under one
  3    or more contributor license agreements.  See the NOTICE file
  4    distributed with this work for additional information
  5    regarding copyright ownership.  The ASF licenses this file
  6    to you under the Apache License, Version 2.0 (the
  7    "License"); you may not use this file except in compliance
  8    with the License.  You may obtain a copy of the License at
  9
 10      http://www.apache.org/licenses/LICENSE-2.0
 11
 12    Unless required by applicable law or agreed to in writing,
 13    software distributed under the License is distributed on an
 14    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15    KIND, either express or implied.  See the License for the
 16    specific language governing permissions and limitations
 17    under the License.
 18-->
 19
 20# cordova-plugin-statusbar
 21
 22# StatusBar
 23
 24> El `StatusBar` objeto proporciona algunas funciones para personalizar el iOS y Android StatusBar.
 25
 26## Instalación
 27
 28    Cordova plugin agregar cordova-plugin-statusbar
 29    
 30
 31## Preferencias
 32
 33#### config.xml
 34
 35*   **StatusBarOverlaysWebView** (boolean, true por defecto). En iOS 7, hacer la superposición statusbar o no superponer la WebView al inicio.
 36    
 37        <preference name="StatusBarOverlaysWebView" value="true" />
 38        
 39
 40*   **StatusBarBackgroundColor** (cadena hexadecimal color, #000000 por defecto). En iOS 7, establecer el color de fondo de la barra de estado por una cadena hexadecimal (#RRGGBB) en el arranque.
 41    
 42        <preference name="StatusBarBackgroundColor" value="#000000" />
 43        
 44
 45*   **StatusBarStyle** (status bar estilo por defecto lightcontent). En iOS 7, definir el estilo de barra de estado. Por defecto las opciones disponibles, lightcontent, blacktranslucent, blackopaque.
 46    
 47        <preference name="StatusBarStyle" value="lightcontent" />
 48        
 49
 50## Escondido en el arranque
 51
 52Durante el tiempo de ejecución puede utilizar la función StatusBar.hide abajo, pero si quieres la barra de estado que está escondido en el inicio de la aplicación, se debe modificar el archivo Info.plist de su aplicación.
 53
 54Agregar/editar estos dos atributos si no está presente. Defina **"inicialmente se esconde la barra de estado"** a **"YES"** y **"Aparición de vista basado en controlador estatus bar"** a **"NO"**. Si se edita manualmente sin Xcode, las claves y valores son:
 55
 56    < llave > UIStatusBarHidden < / key >< verdadero / >< llave > UIViewControllerBasedStatusBarAppearance < / key >< falso / >
 57    
 58
 59## Métodos
 60
 61Este plugin define global `StatusBar` objeto.
 62
 63Aunque en el ámbito global, no estará disponible hasta después de la `deviceready` evento.
 64
 65    document.addEventListener ("deviceready", onDeviceReady, false);
 66    function onDeviceReady() {console.log(StatusBar)};
 67    
 68
 69*   StatusBar.overlaysWebView
 70*   StatusBar.styleDefault
 71*   StatusBar.styleLightContent
 72*   StatusBar.styleBlackTranslucent
 73*   StatusBar.styleBlackOpaque
 74*   StatusBar.backgroundColorByName
 75*   StatusBar.backgroundColorByHexString
 76*   StatusBar.hide
 77*   StatusBar.show
 78
 79## Propiedades
 80
 81*   StatusBar.isVisible
 82
 83## Permisos
 84
 85#### config.xml
 86
 87            < nombre de la función = "StatusBar" >< nombre param = "ios-paquete" value = "CDVStatusBar" onload = "true" / >< / característica >
 88    
 89
 90# StatusBar.overlaysWebView
 91
 92En iOS 7, hacer la barra de estado superposición o no superponer la vista Web.
 93
 94    StatusBar.overlaysWebView(true);
 95    
 96
 97## Descripción
 98
 99En iOS 7, establecida en false para que la barra de estado aparezca como iOS 6. Establece el color de fondo y estilo para utilizar las otras funciones.
100
101## Plataformas soportadas
102
103*   iOS
104
105## Ejemplo rápido
106
107    StatusBar.overlaysWebView(true);
108    StatusBar.overlaysWebView(false);
109    
110
111# StatusBar.styleDefault
112
113Utilice la barra de estado por defecto (texto oscuro, para fondos de luz).
114
115    StatusBar.styleDefault();
116    
117
118## Plataformas soportadas
119
120*   iOS
121*   Windows Phone 7
122*   Windows Phone 8
123*   Windows Phone 8.1
124
125# StatusBar.styleLightContent
126
127Utilice la barra de estado lightContent (texto ligero, para fondos oscuros).
128
129    StatusBar.styleLightContent();
130    
131
132## Plataformas soportadas
133
134*   iOS
135*   Windows Phone 7
136*   Windows Phone 8
137*   Windows Phone 8.1
138
139# StatusBar.styleBlackTranslucent
140
141Utilice la barra de estado blackTranslucent (texto ligero, para fondos oscuros).
142
143    StatusBar.styleBlackTranslucent();
144    
145
146## Plataformas soportadas
147
148*   iOS
149*   Windows Phone 7
150*   Windows Phone 8
151*   Windows Phone 8.1
152
153# StatusBar.styleBlackOpaque
154
155Utilice la barra de estado blackOpaque (texto ligero, para fondos oscuros).
156
157    StatusBar.styleBlackOpaque();
158    
159
160## Plataformas soportadas
161
162*   iOS
163*   Windows Phone 7
164*   Windows Phone 8
165*   Windows Phone 8.1
166
167# StatusBar.backgroundColorByName
168
169En iOS 7, al establecer StatusBar.statusBarOverlaysWebView a false, se puede establecer el color de fondo de la barra de estado nombre del color.
170
171    StatusBar.backgroundColorByName("red");
172    
173
174Nombres de los colores admitidos son:
175
176    negro, gris oscuro, lightGray, blanco, gris, rojo, verde, azul, cian, amarillo, magenta, naranja, púrpura, marrón
177    
178
179## Plataformas soportadas
180
181*   iOS
182*   Windows Phone 7
183*   Windows Phone 8
184*   Windows Phone 8.1
185
186# StatusBar.backgroundColorByHexString
187
188Establece el color de fondo de la barra de estado por una cadena hexadecimal.
189
190    StatusBar.backgroundColorByHexString("#C0C0C0");
191    
192
193Propiedades CSS abreviada también son compatibles.
194
195    StatusBar.backgroundColorByHexString("#333"); = > StatusBar.backgroundColorByHexString("#FAB") #333333; = > #FFAABB
196    
197
198En iOS 7, cuando se establece StatusBar.statusBarOverlaysWebView en false, se puede establecer el color de fondo de la barra de estado una cadena hexadecimal (#RRGGBB).
199
200En WP7 y WP8 también puede especificar valores como #AARRGGBB, donde AA es un valor alfa
201
202## Plataformas soportadas
203
204*   iOS
205*   Windows Phone 7
206*   Windows Phone 8
207*   Windows Phone 8.1
208
209# StatusBar.hide
210
211Ocultar la barra de estado.
212
213    StatusBar.hide();
214    
215
216## Plataformas soportadas
217
218*   iOS
219*   Android
220*   Windows Phone 7
221*   Windows Phone 8
222*   Windows Phone 8.1
223
224# StatusBar.show
225
226Muestra la barra de estado.
227
228    StatusBar.show();
229    
230
231## Plataformas soportadas
232
233*   iOS
234*   Android
235*   Windows Phone 7
236*   Windows Phone 8
237*   Windows Phone 8.1
238
239# StatusBar.isVisible
240
241Lea esta propiedad para ver si la barra de estado es visible o no.
242
243    Si (StatusBar.isVisible) {/ / hacer algo}
244    
245
246## Plataformas soportadas
247
248*   iOS
249*   Android
250*   Windows Phone 7
251*   Windows Phone 8
252*   Windows Phone 8.1