尝试解决穿透问题1

Stewen 2023-10-08 10:59:20 +08:00
parent 275ca3d4a1
commit 3fada76eb9
1 changed files with 5 additions and 0 deletions

View File

@ -88,6 +88,11 @@ static NSString *kUserAnnotationId = @"FATUserAnnotationViewId";
if (@available(iOS 12.0, *)) {
isDark = (self.traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark);
}
///bgView
UIView* bgView = [[UIView alloc] initWithFrame:self.view.bounds];
bgView.backgroundColor = isDark ? UIColor.blackColor : UIColor.whiteColor;
[self.view addSubview:bgView];
self.view.backgroundColor = isDark ? UIColor.blackColor : UIColor.whiteColor;
[self.view addSubview:self.mapView];
self.mapView.frame = CGRectMake(0, 0, fatKScreenWidth, fatKScreenHeight - 200);