自定义Tobar->标题(图像组件)未在IOS上显示,但在Android上可用
const Logo = ({ style }: any) => (
<Image
style={[styles.image, style]}
resizeMode="contain"
source={Theme.images.SplashLogo}
/>
);
const styles = StyleSheet.create({
image: {
flex: 1,
alignSelf: "center"
}
});
export default Logo;
然后注册:
Navigation.registerComponent("Logo", () => Logo);`
在setDefaultOptions之后:
Navigation.setDefaultOptions({
topBar: {
visible: true,
animate: true,
drawBehind: false,
title: {
component: {
name: "Logo",
alignment: "center"
}
}
}
});