React Native view component

php中世界最好的语言
Release: 2018-03-17 13:11:22
Original
1119 people have browsed it

This time I will bring you the React Native view component. What are theprecautionsfor the React Native view component? The following is a practical case, let’s take a look.

This article mainly introduces the method of React Native image viewing component. The editor thinks it is quite good. Now I will share it with you and give it as a reference. Let’s follow the editor and take a look.

React Native image viewing component: react-native-image-viewer, pure JS component, small and fast icon viewing component. Supports zooming in and out of images, setting replacement images if images fail to load, and saving images locally.

Rendering

InstallationMethod

npm i react-native-image-zoom-viewer --save
Copy after login

Usage example

const images = [ { url: 'https://avatars2.githubusercontent.com/u/7970947?v=3&s=460', }, { url: 'https://avatars2.githubusercontent.com/u/7970947?v=3&s=460', }, { url: 'https://avatars2.githubusercontent.com/u/7970947?v=3&s=460', }, ]; export default class Component06 extends Component { constructor(props) { super(props); } render() { return (    ); } }
Copy after login

Main parameter description

  1. imageUrls array of image url addresses

  2. enableImageZoom Whether to allow zooming

  3. failImageSource Image displayed when loading fails

  4. loadingRender loading loading

  5. renderHeader Header style

  6. renderFooter Bottom style

  7. renderIndicator Page number indicator style

I believe you have mastered the method after reading the case in this article. Please pay attention for more exciting things. Other related articles on php Chinese website!

Recommended reading:

How to implement forced refresh of WeChat web side backing

##Use js to quickly obtain the address of the image in the html page


The above is the detailed content of React Native view component. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!