A year month picker component for react native.
import yearMonthPicker.js file to your project.
detail usage you can check for the example.js file.
or open this snap in expo
| $(window).on("scroll", function() { | |
| var scrollHeight = $(document).height(); | |
| var scrollPosition = $(window).height() + $(window).scrollTop(); | |
| if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
| // when scroll to bottom of the page | |
| } | |
| }); |
| /** | |
| * mactive@gmail.com | |
| * 2017-05-08 | |
| */ | |
| 'use strict'; | |
| import React, { Component } from 'react'; | |
| import { | |
| AppRegistry, | |
| StyleSheet, |
A year month picker component for react native.
import yearMonthPicker.js file to your project.
detail usage you can check for the example.js file.
or open this snap in expo
| /** Links: | |
| * - http://stackoverflow.com/questions/36368919/scrollable-image-with-pinch-to-zoom | |
| * - http://blog.lum.pe/gesture-detection-in-react-native-fixing-unexpected-panning/ | |
| * | |
| */ | |
| import React, {Component, PropTypes} from 'react'; | |
| import { Text, View, PanResponder, Image } from 'react-native'; | |
| function calcDistance(x1, y1, x2, y2) { |
| struct Device { | |
| // iDevice detection code | |
| static let IS_IPAD = UIDevice.current.userInterfaceIdiom == .pad | |
| static let IS_IPHONE = UIDevice.current.userInterfaceIdiom == .phone | |
| static let IS_RETINA = UIScreen.main.scale >= 2.0 | |
| static let SCREEN_WIDTH = Int(UIScreen.main.bounds.size.width) | |
| static let SCREEN_HEIGHT = Int(UIScreen.main.bounds.size.height) | |
| static let SCREEN_MAX_LENGTH = Int( max(SCREEN_WIDTH, SCREEN_HEIGHT) ) | |
| static let SCREEN_MIN_LENGTH = Int( min(SCREEN_WIDTH, SCREEN_HEIGHT) ) |