Browse Source

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

Urban Cvek 7 years ago
parent
commit
06c5a0fe0c
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      ios/RCCViewController.m

+ 7
- 0
ios/RCCViewController.m View File

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