mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Log/redbox compiling for AppleTV (#55197)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55197 Platform guarding some unavailable UIKit APIs. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D90711498 fbshipit-source-id: af29087e91d3983a2a95db3633ad0f1ca9b3c16d
This commit is contained in:
1 parent
b8392ad84d
commit
1165c07c24
3 files changed
+10
No files matched your search
@@ -20,7 +20,9 @@
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
if ((self = [super initWithFrame:frame]) != nullptr) {
|
||||
#if !TARGET_OS_TV
|
||||
self.windowLevel = UIWindowLevelStatusBar - 1;
|
||||
#endif
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return self;
|
||||
@@ -40,7 +42,9 @@
|
||||
{
|
||||
self = [super initWithWindowScene:window.windowScene];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
self.windowLevel = UIWindowLevelStatusBar - 1;
|
||||
#endif
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
|
||||
_surface = [[RCTSurface alloc] initWithBridge:bridge moduleName:@"LogBox" initialProperties:@{}];
|
||||
|
||||
@@ -108,8 +108,10 @@
|
||||
_stackTraceTableView.delegate = self;
|
||||
_stackTraceTableView.dataSource = self;
|
||||
_stackTraceTableView.backgroundColor = [UIColor clearColor];
|
||||
#if !TARGET_OS_TV
|
||||
_stackTraceTableView.separatorColor = [UIColor colorWithWhite:1 alpha:0.3];
|
||||
_stackTraceTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
#endif
|
||||
_stackTraceTableView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
|
||||
[self.view addSubview:_stackTraceTableView];
|
||||
|
||||
@@ -308,8 +310,10 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
|
||||
[fullStackTrace appendFormat:@" %@\n", [self formatFrameSource:stackFrame]];
|
||||
}
|
||||
}
|
||||
#if !TARGET_OS_TV
|
||||
UIPasteboard *pb = [UIPasteboard generalPasteboard];
|
||||
[pb setString:fullStackTrace];
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSString *)formatFrameSource:(RCTJSStackFrame *)stackFrame
|
||||
|
||||
@@ -108,7 +108,9 @@
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.backgroundColor = [UIColor colorWithRed:0.8 green:0 blue:0 alpha:1];
|
||||
#if !TARGET_OS_TV
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
#endif
|
||||
_tableView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
|
||||
_tableView.allowsSelection = NO;
|
||||
[self.view addSubview:_tableView];
|
||||
|
||||
Reference in new issue
Block a user