ReactNative開發中如何去掉iOS狀態欄的"Loading from..."

全局搜索

Loading from

將相關的方法注視掉即可

- (void)showWithURL:(NSURL *)URL
{
//  if (!isEnabled) {
    return;
//  }

//  dispatch_async(dispatch_get_main_queue(), ^{

//    _showDate = [NSDate date];
//    if (!_window && !RCTRunningInTestEnvironment()) {
//      CGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;
//      _window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, screenWidth, 22)];
//      _window.backgroundColor = [UIColor blackColor];
//      _window.windowLevel = UIWindowLevelStatusBar + 1;
//
//      _label = [[UILabel alloc] initWithFrame:_window.bounds];
//      _label.font = [UIFont systemFontOfSize:12.0];
//      _label.textColor = [UIColor grayColor];
//      _label.textAlignment = NSTextAlignmentCenter;
//
//      [_window addSubview:_label];
//      [_window makeKeyAndVisible];
//    }
//
//    NSString *source;
//    if (URL.fileURL) {
//      source = @"pre-bundled file";
//    } else {
//      source = [NSString stringWithFormat:@"%@:%@", URL.host, URL.port];
//    }

//    _label.text = [NSString stringWithFormat:@"Loading from %@...", source];
//    _window.hidden = NO;

//  });
}


發佈了14 篇原創文章 · 獲贊 0 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章