import React, {Component} from 'react'; import MenuPopWindow from '../views/PopupWindow'; import Global from '../utils/Global'; import { StyleSheet, Text, View, Image, Dimensions, TouchableOpacity, Button, Platform } from 'react-native'; const {width, height} = Dimensions.get('window'); export default class TitleBar extends Component { constructor(props) { super(props); this.state = { showPop: false, } } renderAndroid() { return ( RN微信 { this.setState({showPop: show}) }} menuIcons={[require('../../images/ic_pop_group_chat.png'), require('../../images/ic_pop_add_friends.png'), require('../../images/ic_pop_scan.png'), require('../../images/ic_pop_pay.png'), require('../../images/ic_pop_help.png')]} menuTexts={['发起群聊', '添加朋友', '扫一扫', '收付款', '帮助与反馈']} /> ); } renderIOS() { return ( RN微信 { this.setState({showPop: show}) }} menuIcons={[require('../../images/ic_pop_group_chat.png'), require('../../images/ic_pop_add_friends.png'), require('../../images/ic_pop_scan.png'), require('../../images/ic_pop_pay.png'), require('../../images/ic_pop_help.png')]} menuTexts={['发起群聊', '添加朋友', '扫一扫', '收付款', '帮助与反馈']} /> ); } render() { if (Platform.OS === 'ios') { return this.renderIOS(); } return this.renderAndroid(); } handleSearchClick = () => { // 跳转到SearchScreen界面 this.props.nav.navigate('Search'); } handleAddClick = () => { this.setState({showPop: !this.state.showPop}); } } class CustomModal extends Component { constructor(props) { super(props); this.state = { modalVisible: false, } } render() { return ( { alert("Modal has been closed.") }}> Hello World! This is a Modal!