Przeglądaj źródła

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

Urban Cvek 7 lat temu
rodzic
commit
06c5a0fe0c
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7
    0
      ios/RCCViewController.m

+ 7
- 0
ios/RCCViewController.m Wyświetl plik

@@ -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