React-native (iv)--listview Navigator.push

Source: Internet
Author: User

React-native (iv)--listview Navigator.push

1. Must be added when using Nav

Touchablehighlight,

Navigatorios;

var {
  appregistry,
  StyleSheet,
  Text,
  View,
  Navigatorios,
  touchablehighlight,
} = React;

Nav must have a rootview when used, which is basically the same as iOS, which is used as follows:

-(Instancetype) Initwithrootviewcontroller: (Uiviewcontroller *) Rootviewcontroller
React-native is used as follows:

<navigatorios Style={style.container}
                    tintcolor={' #333344 '}
                    initialroute={{
                      title: ' Flicker ',
                      Component:require ('./app/views/home/home ')
                    }}
                    Itemwrapperstyle={style.navigator}/>

2, push Use this is not the same as iOS, iOS use the following methods can be implemented:

-(void) Pushviewcontroller: (Uiviewcontroller *) Viewcontroller animated: (BOOL) animated
React-native must use Touchablehighlight mates with the following code:

<touchablehighlight onpress={() = This.showdetail (rsustlbody)} >
        <view style={styles.container} >
          <image
            source={{uri:rsustlbody.otherinfo.productimg}}
            style={styles.thumbnail}
         />
          <view style={styles.rightcontainer}>
            <text style={styles.title}>{rsustlbody.name}</text >
            <text style={styles.year}>{rsustlbody.brokercommissionrate}</text>
          </View>
        </View>
      </TouchableHighlight>  

When using touchablehighlight, there must be a view


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.