相关疑难解决方法(0)

自定义标签栏,每个标签中有两个图像使用反应导航?

在此输入图像描述

我正在使用React Native for ios创建一个应用程序.我没有活动的tintColor,而是想要在选定的选项卡上显示两个小三角形(另一个图像/图标).重要的是,三角形的中心y轴=对于标签栏图像底部的y轴,并且标签图标位于三角形的中心,如下所示.目前我有标签栏,图标和导航工作 - 我只是不知道如何使三角形出现:

ICON TABS

import React, {Component} from 'react';
import {
     Image,
     TouchableOpacity,
     View
} from 'react-native';

class IconTab extends Component {
    render() {
        let icon = require('./Assets/Settings.png');
        const {press, focused, index} = this.props;
        if (index === 0) {
           icon = require('./Assets/Settings.png');
        } else if (index === 1) {
           icon = require('./Assets/Home.png');
        } else if (index === 2) {
           icon = require('./Assets/Search.png');
        } else if (index === 3) {
          icon = require('./Assets/Inbox.png');
        } else {
          icon …
Run Code Online (Sandbox Code Playgroud)

icons frontend react-native react-native-ios react-navigation

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