mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-26 13:25:51 +08:00
[StatusBar] Add ability to toggle the network activity indicator in the status bar + example in UIExplorer
Summary: Added the ability to turn on and off the network activity indicator using: ``` StatusBarIOS.setNetworkActivityIndicatorVisible(true) ``` and ``` StatusBarIOS.setNetworkActivityIndicatorVisible(false) ``` Also added an example to the UIExplorer example app. Fix #986 Closes https://github.com/facebook/react-native/pull/2079 Github Author: Mark Miyashita <negativetwelve@gmail.com>
This commit is contained in:
@@ -71,4 +71,9 @@ RCT_EXPORT_METHOD(setHidden:(BOOL)hidden
|
||||
}
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible:(BOOL)visible)
|
||||
{
|
||||
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:visible];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user