Selaa lähdekoodia

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

Urban Cvek 8 vuotta sitten
vanhempi
commit
06c5a0fe0c
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7
    0
      ios/RCCViewController.m

+ 7
- 0
ios/RCCViewController.m Näytä tiedosto

239
         viewController.view.backgroundColor = color;
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
     NSString *navBarBackgroundColor = self.navigatorStyle[@"navBarBackgroundColor"];
249
     NSString *navBarBackgroundColor = self.navigatorStyle[@"navBarBackgroundColor"];
243
     if (navBarBackgroundColor) {
250
     if (navBarBackgroundColor) {
244
         
251