React-Native-Router-Flux背景图像

时间:2018-01-09 11:09:40

标签: react-native react-native-ios react-native-router-flux

我的应用程序现在出现了问题。

react-native version:0.51

react-native-router-flux版本:4.0.0-beta.27

在我的Android版本中一切正常。 在IOS上,我的背景图像不会显示,它只显示在嵌套的第一层上。

场景和路由器的代码是这样的:

public class MainThread_Wait_TillWorkerThreadsComplete {
    public static void main(String[] args) throws InterruptedException {
        System.out.println("Main Thread Started...");
        // countDown() should be called 4 time to make count 0. So, that await() will release the blocking threads.
        int latchGroupCount = 4;
        CountDownLatch latch = new CountDownLatch(latchGroupCount);
        new Thread(new Task(2, latch), "T1").start();
        new Thread(new Task(7, latch), "T2").start();
        new Thread(new Task(5, latch), "T3").start();
        new Thread(new Task(4, latch), "T4").start();

        //latch.countDown(); // Decrements the count of the latch group.

        // await() method block until the current count reaches to zero
        latch.await(); // block until latchGroupCount is 0
        System.out.println("Main Thread completed.");
    }
}
class Task extends Thread {
    CountDownLatch latch;
    int iterations = 10;
    public Task(int iterations, CountDownLatch latch) {
        this.iterations = iterations;
        this.latch = latch;
    }
    @Override
    public void run() {
        String threadName = Thread.currentThread().getName();
        System.out.println(threadName + " : Started Task...");
        for (int i = 0; i < iterations; i++) {
            System.out.println(threadName + " : "+ i);
            sleep(1);
        }
        System.out.println(threadName + " : Completed Task");
        latch.countDown(); // Decrements the count of the latch,
    }
    public void sleep(int sec) {
        try {
            Thread.sleep(1000 * sec);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}

在根场景级别上,图像可见,在选项卡上背景为黑色。

任何人都可以帮助解决这个问题?

Wallpaper Component只是来自react-native软件包的ImageBackground

类似的东西:

<Wallpaper>
 <Router sceneStyle={{backgorundColor:'transparent'}}>
  <Overlay>
   <Scene key='root'>

    <Tabs>
         ... tabs 
    </Tabs

    <Scene key ='login' component= {Login}/>
   </Scene>
   <Scene key='Messagebar' component={Messagebar}/>
  </Overlay>
 <Router>
</Wallpaper>

的问候,

弗洛

0 个答案:

没有答案