瀏覽代碼

Add ability to pass the name of the image and display it as a background when transitioning between screens. (#861)

Urban Cvek 7 年之前
父節點
當前提交
06c5a0fe0c
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      ios/RCCViewController.m

+ 7
- 0
ios/RCCViewController.m 查看文件

@@ -239,6 +239,13 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
239 239
         viewController.view.backgroundColor = color;
240 240
     }
241 241
     
242
+    NSString *screenBackgroundImageName = self.navigatorStyle[@"screenBackgroundImageName"];
243
+    if (screenBackgroundImageName) {
244
+
245
+        UIImage *image = [UIImage imageNamed: screenBackgroundImageName];
246
+        [viewController.view setBackgroundColor: [UIColor colorWithPatternImage: image]];
247
+    }
248
+
242 249
     NSString *navBarBackgroundColor = self.navigatorStyle[@"navBarBackgroundColor"];
243 250
     if (navBarBackgroundColor) {
244 251