浏览代码

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