2015-02-06 23:46:31 +00:00
|
|
|
/**
|
2015-03-23 22:07:33 +00:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
2015-02-06 23:46:31 +00:00
|
|
|
*
|
|
|
|
* @providesModule StatusBarIOS
|
|
|
|
* @flow
|
|
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
|
2015-03-18 22:57:49 +00:00
|
|
|
var RCTStatusBarManager = require('NativeModules').StatusBarManager;
|
2015-02-06 23:46:31 +00:00
|
|
|
|
|
|
|
var StatusBarIOS = {
|
|
|
|
|
|
|
|
Style: {
|
2015-03-17 20:42:44 +00:00
|
|
|
default: RCTStatusBarManager.Style.default,
|
|
|
|
lightContent: RCTStatusBarManager.Style.lightContent
|
2015-02-06 23:46:31 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
Animation: {
|
2015-03-17 20:42:44 +00:00
|
|
|
none: RCTStatusBarManager.Animation.none,
|
|
|
|
fade: RCTStatusBarManager.Animation.fade,
|
|
|
|
slide: RCTStatusBarManager.Animation.slide,
|
2015-02-06 23:46:31 +00:00
|
|
|
},
|
|
|
|
|
2015-03-23 22:07:33 +00:00
|
|
|
setStyle(style: number, animated?: boolean) {
|
2015-02-06 23:46:31 +00:00
|
|
|
animated = animated || false;
|
2015-03-17 20:42:44 +00:00
|
|
|
RCTStatusBarManager.setStyle(style, animated);
|
2015-02-06 23:46:31 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
setHidden(hidden: boolean, animation: number) {
|
|
|
|
animation = animation || StatusBarIOS.Animation.none;
|
2015-03-17 20:42:44 +00:00
|
|
|
RCTStatusBarManager.setHidden(hidden, animation);
|
2015-02-06 23:46:31 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = StatusBarIOS;
|