Pārlūkot izejas kodu

Make screen background image stretch when using screenBackgroundImageName (#1032)

Edouard Eynard 7 gadus atpakaļ
vecāks
revīzija
581e6c1a6e
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      ios/RCCViewController.m

+ 1
- 1
ios/RCCViewController.m Parādīt failu

@@ -245,7 +245,7 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
245 245
   if (screenBackgroundImageName) {
246 246
     
247 247
     UIImage *image = [UIImage imageNamed: screenBackgroundImageName];
248
-    [viewController.view setBackgroundColor: [UIColor colorWithPatternImage: image]];
248
+    viewController.view.layer.contents = (__bridge id _Nullable)(image.CGImage);
249 249
   }
250 250
   
251 251
   NSString *navBarBackgroundColor = self.navigatorStyle[@"navBarBackgroundColor"];