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
|
|
|
|
2015-06-05 15:46:17 +00:00
|
|
|
type StatusBarStyle = $Enum<{
|
|
|
|
'default': string,
|
|
|
|
'light-content': string,
|
|
|
|
}>;
|
2015-02-06 23:46:31 +00:00
|
|
|
|
2015-06-05 15:46:17 +00:00
|
|
|
type StatusBarAnimation = $Enum<{
|
|
|
|
'none': string,
|
|
|
|
'fade': string,
|
|
|
|
'slide': string,
|
|
|
|
}>;
|
2015-02-06 23:46:31 +00:00
|
|
|
|
2015-06-05 15:46:17 +00:00
|
|
|
var StatusBarIOS = {
|
2015-02-06 23:46:31 +00:00
|
|
|
|
2015-06-05 15:46:17 +00:00
|
|
|
setStyle(style: StatusBarStyle, 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
|
|
|
},
|
|
|
|
|
2015-06-05 15:46:17 +00:00
|
|
|
setHidden(hidden: boolean, animation?: StatusBarAnimation) {
|
|
|
|
animation = 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;
|