瀏覽代碼

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

Edouard Eynard 7 年之前
父節點
當前提交
581e6c1a6e
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      ios/RCCViewController.m

+ 1
- 1
ios/RCCViewController.m 查看文件

@@ -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"];