小编shu*_*sin的帖子

在另一个上面叠加或添加视图:React Native

我正在尝试添加<Image>一个<MapView>.应该看起来像这样 -

在此输入图像描述

这是我的代码 -

<MapView
    mapType='standard'
    style={styles.map}
    region={{
        latitude: selectedLoc.location.latitude,
        longitude: selectedLoc.location.longitude,
        latitudeDelta: 0.005,
        longitudeDelta: 0.005
    }}
    onRegionChange={() => { } }
    onRegionChangeComplete={() => { } }
    showsUserLocation={false}
    zoomEnabled={false}
    draggable={false}
    annotations={[{
        longitude: selectedLoc.location.latitude,
        latitude: selectedLoc.location.longitude,
        title: selectedLoc.title
    }]}
    initialRegion={{
        latitude: selectedLoc.location.latitude,
        longitude: selectedLoc.location.longitude
    }}>
    <Image
        style={{
            width: 50,
            height: 50,
        }}
        resizeMode={"contain"}
        source={{ uri: 'https://unsplash.it/50/50/?random' }}
        />
</MapView>
Run Code Online (Sandbox Code Playgroud)

我从这段代码中找不到任何视图.请告诉我

android ios reactjs react-native

6
推荐指数
1
解决办法
7196
查看次数

设置调试或发布| React Native - iOS

如何在React Native for iOS(Xcode)中设置调试或发布模式,就像我们在Build Setting-> LLVM Preprocessor over Native code中所做的那样?有什么办法或者我需要在JS代码中指定吗?如果没有办法,那么我们应该如何在React Native JS Code中访问Xcode设置的属性?

xcode ios reactjs react-native

4
推荐指数
1
解决办法
6859
查看次数

适用于iOS的Google Admob.真实广告何时以及如何出现?

最近我在iOS应用中添加了插页式广告.虽然在开发阶段我们应该使用testDevice id来测试广告.google admob faq说你可以提交带有testDevice id代码的应用程序.我确实提交了这个.我的应用会在商店上发布真实广告吗?

interstitial admob ios

3
推荐指数
1
解决办法
1926
查看次数

标签 统计

ios ×3

react-native ×2

reactjs ×2

admob ×1

android ×1

interstitial ×1

xcode ×1