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
| 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) ) |
| /** 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) { |
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
| /** | |
| * [email protected] | |
| * 2017-05-08 | |
| */ | |
| 'use strict'; | |
| import React, { Component } from 'react'; | |
| import { | |
| AppRegistry, | |
| StyleSheet, |
| $(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 | |
| } | |
| }); |
| #!/bin/bash | |
| BuidPath=build/`date +%F-%T` | |
| ProjectName=HNPositionAsst | |
| Configuration=Release | |
| ExportOptionsPlist=ExportOptions.plist | |
| IPA_NAME=app | |
| mkdir -p $BuidPath | |
| archivePath=$BuidPath/$ProjectName.xcarchive |
| // pod 'AesGcm' | |
| #import <AesGcm/IAGAesGcm.h> | |
| // replace with your own key, base64 encoding | |
| static NSString * const AES_GCM_KEY = @"MTIzNDU2Nzg5MGFiY2RlZg=="; | |
| - (NSString *)encryptString:(NSString *)text { | |
| NSData *key = [[NSData alloc] initWithBase64EncodedString:AES_GCM_KEY options:NSDataBase64DecodingIgnoreUnknownCharacters]; | |
| NSData *iv = [self randomKeyDataGeneratorWithNumberBits:96]; |
| const base64Key = 'your key base64 encode'; | |
| let secretKey; | |
| function getKeyArray(key) { | |
| const bkey = atob(key); | |
| const keyArray = []; | |
| for (let i = 0; i < bkey.length; i += 1) { | |
| keyArray.push(bkey.charCodeAt(i)); | |
| } | |
| return keyArray; |
| post_install do |installer| | |
| # main project pod target | |
| applicationTargets = [ | |
| 'Pods-Mall', | |
| ] | |
| embedded_targets = installer.aggregate_targets.select { |aggregate_target| | |
| !(applicationTargets.include? aggregate_target.name) | |
| } | |
AsyncLoadFile.jsx
import React, { Component } from 'react';
export default function asyncComponent(importComponent) {
class AsyncComponent extends Component {
/**
* @constructor
* @desc Represents AsyncComponent component
* @param props Properties passed from parent component