Merge branch 'master' into master
|
@ -38,7 +38,7 @@ and
|
|||
- [x] Prioritize images.
|
||||
- [x] Preload images.
|
||||
- [x] GIF support.
|
||||
- [x] Border radius property.
|
||||
- [x] Border radius.
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -132,10 +132,9 @@ Called when the image finishes loading, whether it was successful or an error.
|
|||
|
||||
---
|
||||
|
||||
### `borderRadius: number`
|
||||
### `style`
|
||||
|
||||
A border radius for the image.
|
||||
Can be used to make a circular cropped version of the image.
|
||||
A React Native style. Supports using `borderRadius`.
|
||||
|
||||
## Static Methods
|
||||
|
||||
|
|
|
@ -1,29 +1,46 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`FastImage renders correctly. 1`] = `
|
||||
<FastImageView
|
||||
onFastImageError={undefined}
|
||||
onFastImageLoad={undefined}
|
||||
onFastImageLoadEnd={undefined}
|
||||
onFastImageLoadStart={undefined}
|
||||
onFastImageProgress={undefined}
|
||||
resizeMode="cover"
|
||||
source={
|
||||
Object {
|
||||
"headers": Object {
|
||||
"token": "someToken",
|
||||
},
|
||||
"priority": "high",
|
||||
"uri": "https://facebook.github.io/react/img/logo_og.png",
|
||||
}
|
||||
}
|
||||
<View
|
||||
style={
|
||||
Object {
|
||||
"height": 44,
|
||||
"width": 44,
|
||||
}
|
||||
Array [
|
||||
Object {
|
||||
"height": 44,
|
||||
"width": 44,
|
||||
},
|
||||
Object {
|
||||
"overflow": "hidden",
|
||||
},
|
||||
]
|
||||
}
|
||||
/>
|
||||
>
|
||||
<FastImageView
|
||||
onFastImageError={undefined}
|
||||
onFastImageLoad={undefined}
|
||||
onFastImageLoadEnd={undefined}
|
||||
onFastImageLoadStart={undefined}
|
||||
onFastImageProgress={undefined}
|
||||
resizeMode="cover"
|
||||
source={
|
||||
Object {
|
||||
"headers": Object {
|
||||
"token": "someToken",
|
||||
},
|
||||
"priority": "high",
|
||||
"uri": "https://facebook.github.io/react/img/logo_og.png",
|
||||
}
|
||||
}
|
||||
style={
|
||||
Object {
|
||||
"bottom": 0,
|
||||
"left": 0,
|
||||
"position": "absolute",
|
||||
"right": 0,
|
||||
"top": 0,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
`;
|
||||
|
||||
exports[`Renders a normal Image when not passed a uri. 1`] = `
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"name": "example",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.0.0",
|
||||
"react-native": "0.50.4",
|
||||
"react-native-fast-image": "file:../react-native-fast-image-2.0.0.tgz",
|
||||
"react-native-vector-icons": "^4.4.2",
|
||||
"react-navigation": "^1.0.0-beta.21",
|
||||
"react-timeout": "^1.0.1",
|
||||
"uuid": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "21.2.0",
|
||||
"babel-preset-react-native": "4.0.0",
|
||||
"jest": "21.2.1",
|
||||
"react-test-renderer": "16.0.0"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
}
|
||||
}
|
|
@ -46,6 +46,7 @@ export interface ImageStyle extends FlexStyle, TransformsStyle, ShadowStyleIOS {
|
|||
export interface FastImageProperties {
|
||||
source: FastImageSource | number
|
||||
resizeMode?: FastImage.ResizeMode
|
||||
borderRadius?: number
|
||||
|
||||
onLoadStart?(): void
|
||||
|
||||
|
|
|
@ -51,30 +51,8 @@ class FastImage extends Component {
|
|||
|
||||
const resolvedSource = resolveAssetSource(source)
|
||||
|
||||
if (children) {
|
||||
throw new Error(
|
||||
'The <FastImage> component cannot contain children. If you want to render content on top of the image consider using absolute positioning.',
|
||||
)
|
||||
}
|
||||
|
||||
if (!borderRadius) {
|
||||
return (
|
||||
<FastImageView
|
||||
ref={e => (this._root = e)}
|
||||
{...props}
|
||||
style={style}
|
||||
source={resolvedSource}
|
||||
onFastImageLoadStart={onLoadStart}
|
||||
onFastImageProgress={onProgress}
|
||||
onFastImageLoad={onLoad}
|
||||
onFastImageError={onError}
|
||||
onFastImageLoadEnd={onLoadEnd}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={[style, styles.imageContainer]} borderRadius={borderRadius}>
|
||||
<View style={[style, styles.imageContainer]}>
|
||||
<FastImageView
|
||||
ref={e => (this._root = e)}
|
||||
{...props}
|
||||
|
@ -86,6 +64,7 @@ class FastImage extends Component {
|
|||
onFastImageError={onError}
|
||||
onFastImageLoadEnd={onLoadEnd}
|
||||
/>
|
||||
{children && <View style={StyleSheet.absoluteFill}>{children}</View>}
|
||||
</View>
|
||||
)
|
||||
}
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
@implementation FFFastImageView {
|
||||
BOOL hasSentOnLoadStart;
|
||||
BOOL hasCompleted;
|
||||
BOOL hasErrored;
|
||||
}
|
||||
|
||||
- (void)setResizeMode:(RCTResizeMode)resizeMode
|
||||
|
@ -12,6 +14,27 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)setOnFastImageLoadEnd:(RCTBubblingEventBlock)onFastImageLoadEnd {
|
||||
_onFastImageLoadEnd = onFastImageLoadEnd;
|
||||
if (hasCompleted) {
|
||||
_onFastImageLoadEnd(@{});
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setOnFastImageLoad:(RCTBubblingEventBlock)onFastImageLoad {
|
||||
_onFastImageLoad = onFastImageLoad;
|
||||
if (hasCompleted) {
|
||||
_onFastImageLoad(@{});
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setOnFastImageError:(RCTDirectEventBlock)onFastImageError {
|
||||
_onFastImageError = onFastImageError;
|
||||
if (hasErrored) {
|
||||
_onFastImageError(@{});
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setOnFastImageLoadStart:(RCTBubblingEventBlock)onFastImageLoadStart {
|
||||
if (_source && !hasSentOnLoadStart) {
|
||||
_onFastImageLoadStart = onFastImageLoadStart;
|
||||
|
@ -26,12 +49,12 @@
|
|||
- (void)setSource:(FFFastImageSource *)source {
|
||||
if (_source != source) {
|
||||
_source = source;
|
||||
|
||||
|
||||
// Set headers.
|
||||
[_source.headers enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString* header, BOOL *stop) {
|
||||
[[SDWebImageDownloader sharedDownloader] setValue:header forHTTPHeaderField:key];
|
||||
}];
|
||||
|
||||
|
||||
// Set priority.
|
||||
SDWebImageOptions options = 0;
|
||||
options |= SDWebImageRetryFailed;
|
||||
|
@ -46,31 +69,33 @@
|
|||
options |= SDWebImageHighPriority;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (_onFastImageLoadStart) {
|
||||
_onFastImageLoadStart(@{});
|
||||
hasSentOnLoadStart = YES;
|
||||
} {
|
||||
hasSentOnLoadStart = NO;
|
||||
}
|
||||
|
||||
hasCompleted = NO;
|
||||
hasErrored = NO;
|
||||
|
||||
// Load the new source.
|
||||
[self sd_setImageWithURL:_source.uri
|
||||
placeholderImage:nil
|
||||
options:options
|
||||
progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||
double progress = MIN(1, MAX(0, (double) receivedSize / (double) expectedSize));
|
||||
if (_onFastImageProgress) {
|
||||
_onFastImageProgress(@{
|
||||
@"loaded": @(receivedSize),
|
||||
@"total": @(expectedSize)
|
||||
});
|
||||
@"loaded": @(receivedSize),
|
||||
@"total": @(expectedSize)
|
||||
});
|
||||
}
|
||||
} completed:^(UIImage * _Nullable image,
|
||||
NSError * _Nullable error,
|
||||
SDImageCacheType cacheType,
|
||||
NSURL * _Nullable imageURL) {
|
||||
if (error) {
|
||||
hasErrored = YES;
|
||||
if (_onFastImageError) {
|
||||
_onFastImageError(@{});
|
||||
if (_onFastImageLoadEnd) {
|
||||
|
@ -78,6 +103,7 @@
|
|||
}
|
||||
}
|
||||
} else {
|
||||
hasCompleted = YES;
|
||||
if (_onFastImageLoad) {
|
||||
_onFastImageLoad(@{});
|
||||
if (_onFastImageLoadEnd) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-native-fast-image",
|
||||
"version": "2.2.4",
|
||||
"version": "3.0.2",
|
||||
"description": "🚩 FastImage, performant React Native image component.",
|
||||
"keywords": [
|
||||
"cache",
|
||||
|
@ -18,12 +18,11 @@
|
|||
"files": [
|
||||
"ios",
|
||||
"android",
|
||||
"utils",
|
||||
"FastImage.js",
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"react-native-fast-image.podspec"
|
||||
],
|
||||
"main": "FastImage.js",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"example": "example"
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "image-server",
|
||||
"name": "react-native-fast-image-example-server",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
Before Width: | Height: | Size: 8.9 MiB After Width: | Height: | Size: 8.9 MiB |
Before Width: | Height: | Size: 12 MiB After Width: | Height: | Size: 12 MiB |
Before Width: | Height: | Size: 16 MiB After Width: | Height: | Size: 16 MiB |
Before Width: | Height: | Size: 913 KiB After Width: | Height: | Size: 913 KiB |
Before Width: | Height: | Size: 804 KiB After Width: | Height: | Size: 804 KiB |
|
@ -16,11 +16,15 @@
|
|||
; Ignore polyfills
|
||||
.*/Libraries/polyfills/.*
|
||||
|
||||
; Ignore metro
|
||||
.*/node_modules/metro/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||
node_modules/react-native/flow/
|
||||
node_modules/react-native/flow-github/
|
||||
|
||||
[options]
|
||||
emoji=true
|
||||
|
@ -31,18 +35,20 @@ munge_underscores=true
|
|||
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.jsx
|
||||
module.file_ext=.json
|
||||
module.file_ext=.native.js
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
suppress_type=$FixMe
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
unsafe.enable_getters_and_setters=true
|
||||
|
||||
[version]
|
||||
^0.56.0
|
||||
^0.65.0
|
|
@ -1,20 +1,14 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
package="com.example">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="16"
|
||||
android:targetSdkVersion="22" />
|
||||
|
||||
<application
|
||||
android:name=".MainApplication"
|
||||
android:allowBackup="true"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="false"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
|
@ -1,90 +1,90 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
|
@ -16,14 +16,12 @@ const BorderRadiusExample = ({ onPressReload, bust }) => (
|
|||
<SectionFlex onPress={onPressReload}>
|
||||
<FastImage
|
||||
style={styles.imageSquare}
|
||||
borderRadius={50}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
/>
|
||||
<FastImage
|
||||
style={styles.imageRectangular}
|
||||
borderRadius={50}
|
||||
source={{
|
||||
uri: IMAGE_URL + bust,
|
||||
}}
|
||||
|
@ -34,6 +32,7 @@ const BorderRadiusExample = ({ onPressReload, bust }) => (
|
|||
|
||||
const styles = StyleSheet.create({
|
||||
imageSquare: {
|
||||
borderRadius: 50,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
||||
|
@ -41,6 +40,9 @@ const styles = StyleSheet.create({
|
|||
flex: 0,
|
||||
},
|
||||
imageRectangular: {
|
||||
borderRadius: 50,
|
||||
borderTopLeftRadius: 10,
|
||||
borderBottomRightRadius: 10,
|
||||
height: 100,
|
||||
backgroundColor: '#ddd',
|
||||
margin: 20,
|
|
@ -1,21 +1,27 @@
|
|||
import React from 'react'
|
||||
import { StyleSheet, Text, TouchableOpacity } from 'react-native'
|
||||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
const Button = ({ text, onPress }) => (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<Text style={styles.button}>{text}</Text>
|
||||
<View style={styles.button}>
|
||||
<Text style={styles.text}>{text}</Text>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
button: {
|
||||
backgroundColor: 'black',
|
||||
color: 'white',
|
||||
margin: 5,
|
||||
padding: 5,
|
||||
height: 44,
|
||||
paddingLeft: 10,
|
||||
paddingRight: 10,
|
||||
borderRadius: 2,
|
||||
borderRadius: 10,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
},
|
||||
text: {
|
||||
color: 'white',
|
||||
},
|
||||
})
|
||||
|
|
@ -6,23 +6,32 @@ import Section from './Section'
|
|||
import FeatureText from './FeatureText'
|
||||
import uuid from 'uuid/v4'
|
||||
import Button from './Button'
|
||||
import { createImageProgress } from 'react-native-image-progress'
|
||||
|
||||
const IMAGE_URL =
|
||||
'https://cdn-images-1.medium.com/max/1600/1*-CY5bU4OqiJRox7G00sftw.gif'
|
||||
|
||||
const Image = createImageProgress(FastImage)
|
||||
|
||||
class PreloadExample extends Component {
|
||||
state = {
|
||||
show: false,
|
||||
url: IMAGE_URL,
|
||||
}
|
||||
|
||||
bustAndPreload = () => {
|
||||
bustCache = () => {
|
||||
const key = uuid()
|
||||
const bust = `?bust=${key}`
|
||||
// Preload images. This can be called anywhere.
|
||||
const url = IMAGE_URL + bust
|
||||
FastImage.preload([{ uri: url }])
|
||||
this.setState({ url, show: false })
|
||||
this.setState({
|
||||
url,
|
||||
show: false,
|
||||
})
|
||||
}
|
||||
|
||||
preload = () => {
|
||||
FastImage.preload([{ uri: this.state.url }])
|
||||
}
|
||||
|
||||
showImage = () => {
|
||||
|
@ -34,18 +43,25 @@ class PreloadExample extends Component {
|
|||
<View>
|
||||
<Section>
|
||||
<FeatureText text="• Preloading." />
|
||||
<FeatureText text="• Progress indication using react-native-image-progress." />
|
||||
</Section>
|
||||
<SectionFlex style={styles.section} onPress={this.props.onPressReload}>
|
||||
{this.state.show ? (
|
||||
<FastImage style={styles.image} source={{ uri: this.state.url }} />
|
||||
<Image style={styles.image} source={{ uri: this.state.url }} />
|
||||
) : (
|
||||
<View style={styles.image} />
|
||||
)}
|
||||
<Button
|
||||
text="Bust cache and preload."
|
||||
onPress={this.bustAndPreload}
|
||||
/>
|
||||
<Button text="Render image." onPress={this.showImage} />
|
||||
<View style={{ flexDirection: 'row', marginHorizontal: 10 }}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Bust" onPress={this.bustCache} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Preload" onPress={this.preload} />
|
||||
</View>
|
||||
<View style={{ flex: 1 }}>
|
||||
<Button text="Render" onPress={this.showImage} />
|
||||
</View>
|
||||
</View>
|
||||
</SectionFlex>
|
||||
</View>
|
||||
)
|
|
@ -24,31 +24,31 @@
|
|||
2D02E4BC1E0B4A80006451C7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
|
||||
2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
|
||||
2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */; };
|
||||
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
|
||||
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */; };
|
||||
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E881DF850E9000B6D8A /* libRCTLinking-tvOS.a */; };
|
||||
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E8C1DF850E9000B6D8A /* libRCTNetwork-tvOS.a */; };
|
||||
2D02E4C61E0B4AEC006451C7 /* libRCTSettings-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E901DF850E9000B6D8A /* libRCTSettings-tvOS.a */; };
|
||||
2D02E4C71E0B4AEC006451C7 /* libRCTText-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E941DF850E9000B6D8A /* libRCTText-tvOS.a */; };
|
||||
2D02E4C81E0B4AEC006451C7 /* libRCTWebSocket-tvOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */; };
|
||||
2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DAD3EA31DF850E9000B6D8A /* libReact.a */; };
|
||||
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D16E6891FA4F8E400B85C8A /* libReact.a */; };
|
||||
2DCD954D1E0B4F2C00145EB5 /* exampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* exampleTests.m */; };
|
||||
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
|
||||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
|
||||
ADBDB9381DFEBF1600ED6528 /* libRCTBlob.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */; };
|
||||
F6407FE3754A442185201A3D /* libFastImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B869FE79F79845B7AF957955 /* libFastImage.a */; };
|
||||
39419E46C0394FB0B5A03251 /* libRNVectorIcons.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 25DB30F1198A4AF49A05F411 /* libRNVectorIcons.a */; };
|
||||
2C1EA3D00E644F1FBCCD3BAD /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = BCBB34BE985F45029532D430 /* Entypo.ttf */; };
|
||||
716BBC17946A40AEADDA4DF8 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 3F3576BAE9CB40D0959D56C0 /* EvilIcons.ttf */; };
|
||||
70A404B0443A43F09CBD76BB /* Feather.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 975F42B74B03496ABE2E5021 /* Feather.ttf */; };
|
||||
F906AEFBED844A6598DEB460 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4220AF12FC614D528284D36B /* FontAwesome.ttf */; };
|
||||
098AA93AB8B34B318AA6BC41 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 22E544B04EE343A19D733747 /* Foundation.ttf */; };
|
||||
94C6D585268144C1A9330029 /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 14A8E7A581874AC5AE37321B /* Ionicons.ttf */; };
|
||||
49E8A1E35B374FB3B943AD3D /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6018193EEFF04AFB94788DB4 /* MaterialCommunityIcons.ttf */; };
|
||||
CAFFE5900D9C4C70A2145F85 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 23E7B884B72847E1BD8C9A3F /* MaterialIcons.ttf */; };
|
||||
917E77D1F90B4D008CC6BF88 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 5A82E560B3B349BCBA066A32 /* Octicons.ttf */; };
|
||||
76AE6A24B8F043DE8A59C1DB /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = F252FD91C3D64473B4C60F10 /* SimpleLineIcons.ttf */; };
|
||||
2B443C877B684BAEBC7A26F6 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C62F12D380CC4FCCA957FB0E /* Zocial.ttf */; };
|
||||
D44D0142A3AD49308514BECB /* libFastImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7263D58134CA43D5870168FF /* libFastImage.a */; };
|
||||
BD561F89A19A4F9E90272FBF /* libRNVectorIcons.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ECE440A804743EDB78A1A30 /* libRNVectorIcons.a */; };
|
||||
AF703E8EC1D04ACBA9B850EE /* Entypo.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 1D8A22768E9A4EDFB1344277 /* Entypo.ttf */; };
|
||||
1AE068178E21459E886D9917 /* EvilIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 96B91E481AAE4734A146E2CB /* EvilIcons.ttf */; };
|
||||
1218D0AAFFFD4DA2AEA2D0AD /* Feather.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 52E64789CFED474A904412E4 /* Feather.ttf */; };
|
||||
4F14CAF5592D44118B87A899 /* FontAwesome.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0803AEAB4D2D4C918F0B3914 /* FontAwesome.ttf */; };
|
||||
864518F1A79C41D6A1FE8F85 /* Foundation.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B5536E1410B84DBA8A76DA54 /* Foundation.ttf */; };
|
||||
76857B476BDF44D281435ADD /* Ionicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B576801919AA42499A071B91 /* Ionicons.ttf */; };
|
||||
5B16C41E27D940CA85B76BCB /* MaterialCommunityIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A5A4B52BB72544BFB7EA76E0 /* MaterialCommunityIcons.ttf */; };
|
||||
3B84831B113A43F9B97AA014 /* MaterialIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6CF599F9FCFF402C88F87549 /* MaterialIcons.ttf */; };
|
||||
193523D2E0744E5FB1416425 /* Octicons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = EFE018550FEF481D9859B10F /* Octicons.ttf */; };
|
||||
091E302C37364569A595F6B3 /* SimpleLineIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 18DBE68A84244BF89A7A4BB7 /* SimpleLineIcons.ttf */; };
|
||||
65B1CA66024A426E8783DC32 /* Zocial.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D6C36FEC85D8491696402FF7 /* Zocial.ttf */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
|
@ -122,6 +122,27 @@
|
|||
remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7;
|
||||
remoteInfo = "example-tvOS";
|
||||
};
|
||||
2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = ADD01A681E09402E00F6D226;
|
||||
remoteInfo = "RCTBlob-tvOS";
|
||||
};
|
||||
2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3DBE0D001F3B181A0099AA32;
|
||||
remoteInfo = fishhook;
|
||||
};
|
||||
2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 3DBE0D0D1F3B181C0099AA32;
|
||||
remoteInfo = "fishhook-tvOS";
|
||||
};
|
||||
3DAD3E831DF850E9000B6D8A /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */;
|
||||
|
@ -272,25 +293,26 @@
|
|||
146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = "<group>"; };
|
||||
2D02E47B1E0B4A5D006451C7 /* example-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D02E4901E0B4A5D006451C7 /* example-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "example-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libReact.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
|
||||
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
|
||||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
|
||||
ADBDB91F1DFEBF0600ED6528 /* RCTBlob.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTBlob.xcodeproj; path = "../node_modules/react-native/Libraries/Blob/RCTBlob.xcodeproj"; sourceTree = "<group>"; };
|
||||
4CA55AE949EB480690A588D9 /* FastImage.xcodeproj */ = {isa = PBXFileReference; name = "FastImage.xcodeproj"; path = "../node_modules/react-native-fast-image/ios/FastImage.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
B869FE79F79845B7AF957955 /* libFastImage.a */ = {isa = PBXFileReference; name = "libFastImage.a"; path = "libFastImage.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
D81DD9BCAA284F0087D77A0E /* RNVectorIcons.xcodeproj */ = {isa = PBXFileReference; name = "RNVectorIcons.xcodeproj"; path = "../node_modules/react-native-vector-icons/RNVectorIcons.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
25DB30F1198A4AF49A05F411 /* libRNVectorIcons.a */ = {isa = PBXFileReference; name = "libRNVectorIcons.a"; path = "libRNVectorIcons.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
BCBB34BE985F45029532D430 /* Entypo.ttf */ = {isa = PBXFileReference; name = "Entypo.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
3F3576BAE9CB40D0959D56C0 /* EvilIcons.ttf */ = {isa = PBXFileReference; name = "EvilIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
975F42B74B03496ABE2E5021 /* Feather.ttf */ = {isa = PBXFileReference; name = "Feather.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
4220AF12FC614D528284D36B /* FontAwesome.ttf */ = {isa = PBXFileReference; name = "FontAwesome.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
22E544B04EE343A19D733747 /* Foundation.ttf */ = {isa = PBXFileReference; name = "Foundation.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
14A8E7A581874AC5AE37321B /* Ionicons.ttf */ = {isa = PBXFileReference; name = "Ionicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
6018193EEFF04AFB94788DB4 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; name = "MaterialCommunityIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
23E7B884B72847E1BD8C9A3F /* MaterialIcons.ttf */ = {isa = PBXFileReference; name = "MaterialIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
5A82E560B3B349BCBA066A32 /* Octicons.ttf */ = {isa = PBXFileReference; name = "Octicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
F252FD91C3D64473B4C60F10 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; name = "SimpleLineIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
C62F12D380CC4FCCA957FB0E /* Zocial.ttf */ = {isa = PBXFileReference; name = "Zocial.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
D9815865DFA14125B552FAA5 /* FastImage.xcodeproj */ = {isa = PBXFileReference; name = "FastImage.xcodeproj"; path = "../node_modules/react-native-fast-image/ios/FastImage.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
7263D58134CA43D5870168FF /* libFastImage.a */ = {isa = PBXFileReference; name = "libFastImage.a"; path = "libFastImage.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
B1ADDA4F510E49DFA0D4B380 /* RNVectorIcons.xcodeproj */ = {isa = PBXFileReference; name = "RNVectorIcons.xcodeproj"; path = "../node_modules/react-native-vector-icons/RNVectorIcons.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
|
||||
6ECE440A804743EDB78A1A30 /* libRNVectorIcons.a */ = {isa = PBXFileReference; name = "libRNVectorIcons.a"; path = "libRNVectorIcons.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
|
||||
1D8A22768E9A4EDFB1344277 /* Entypo.ttf */ = {isa = PBXFileReference; name = "Entypo.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
96B91E481AAE4734A146E2CB /* EvilIcons.ttf */ = {isa = PBXFileReference; name = "EvilIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
52E64789CFED474A904412E4 /* Feather.ttf */ = {isa = PBXFileReference; name = "Feather.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
0803AEAB4D2D4C918F0B3914 /* FontAwesome.ttf */ = {isa = PBXFileReference; name = "FontAwesome.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
B5536E1410B84DBA8A76DA54 /* Foundation.ttf */ = {isa = PBXFileReference; name = "Foundation.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
B576801919AA42499A071B91 /* Ionicons.ttf */ = {isa = PBXFileReference; name = "Ionicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
A5A4B52BB72544BFB7EA76E0 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; name = "MaterialCommunityIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
6CF599F9FCFF402C88F87549 /* MaterialIcons.ttf */ = {isa = PBXFileReference; name = "MaterialIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/MaterialIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
EFE018550FEF481D9859B10F /* Octicons.ttf */ = {isa = PBXFileReference; name = "Octicons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
18DBE68A84244BF89A7A4BB7 /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; name = "SimpleLineIcons.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
D6C36FEC85D8491696402FF7 /* Zocial.ttf */ = {isa = PBXFileReference; name = "Zocial.ttf"; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = unknown; explicitFileType = undefined; includeInIndex = 0; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -319,8 +341,8 @@
|
|||
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
|
||||
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
|
||||
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
|
||||
F6407FE3754A442185201A3D /* libFastImage.a in Frameworks */,
|
||||
39419E46C0394FB0B5A03251 /* libRNVectorIcons.a in Frameworks */,
|
||||
D44D0142A3AD49308514BECB /* libFastImage.a in Frameworks */,
|
||||
BD561F89A19A4F9E90272FBF /* libRNVectorIcons.a in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -328,8 +350,8 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2D02E4C91E0B4AEC006451C7 /* libReact.a in Frameworks */,
|
||||
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation-tvOS.a in Frameworks */,
|
||||
2D16E6881FA4F8E400B85C8A /* libReact.a in Frameworks */,
|
||||
2D02E4C21E0B4AEC006451C7 /* libRCTAnimation.a in Frameworks */,
|
||||
2D02E4C31E0B4AEC006451C7 /* libRCTImage-tvOS.a in Frameworks */,
|
||||
2D02E4C41E0B4AEC006451C7 /* libRCTLinking-tvOS.a in Frameworks */,
|
||||
2D02E4C51E0B4AEC006451C7 /* libRCTNetwork-tvOS.a in Frameworks */,
|
||||
|
@ -422,6 +444,8 @@
|
|||
children = (
|
||||
139FDEF41B06529B00C62182 /* libRCTWebSocket.a */,
|
||||
3DAD3E991DF850E9000B6D8A /* libRCTWebSocket-tvOS.a */,
|
||||
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */,
|
||||
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -444,7 +468,6 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
146834041AC3E56700842450 /* libReact.a */,
|
||||
3DAD3EA31DF850E9000B6D8A /* libReact.a */,
|
||||
3DAD3EA51DF850E9000B6D8A /* libyoga.a */,
|
||||
3DAD3EA71DF850E9000B6D8A /* libyoga.a */,
|
||||
3DAD3EA91DF850E9000B6D8A /* libcxxreact.a */,
|
||||
|
@ -456,11 +479,19 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2D16E6891FA4F8E400B85C8A /* libReact.a */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
5E91572E1DD0AC6500FF2AA8 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */,
|
||||
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */,
|
||||
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -489,8 +520,8 @@
|
|||
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
|
||||
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
|
||||
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
|
||||
4CA55AE949EB480690A588D9 /* FastImage.xcodeproj */,
|
||||
D81DD9BCAA284F0087D77A0E /* RNVectorIcons.xcodeproj */,
|
||||
D9815865DFA14125B552FAA5 /* FastImage.xcodeproj */,
|
||||
B1ADDA4F510E49DFA0D4B380 /* RNVectorIcons.xcodeproj */,
|
||||
);
|
||||
name = Libraries;
|
||||
sourceTree = "<group>";
|
||||
|
@ -511,7 +542,8 @@
|
|||
832341AE1AAA6A7D00B99B32 /* Libraries */,
|
||||
00E356EF1AD99517003FC87E /* exampleTests */,
|
||||
83CBBA001A601CBA00E9B192 /* Products */,
|
||||
A0849779C4634B27B68B337F /* Resources */,
|
||||
2D16E6871FA4F8E400B85C8A /* Frameworks */,
|
||||
B93477F2D7B74CA794E59AF0 /* Resources */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
|
@ -533,24 +565,25 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
ADBDB9271DFEBF0700ED6528 /* libRCTBlob.a */,
|
||||
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A0849779C4634B27B68B337F /* Resources */ = {
|
||||
B93477F2D7B74CA794E59AF0 /* Resources */ = {
|
||||
isa = "PBXGroup";
|
||||
children = (
|
||||
BCBB34BE985F45029532D430 /* Entypo.ttf */,
|
||||
3F3576BAE9CB40D0959D56C0 /* EvilIcons.ttf */,
|
||||
975F42B74B03496ABE2E5021 /* Feather.ttf */,
|
||||
4220AF12FC614D528284D36B /* FontAwesome.ttf */,
|
||||
22E544B04EE343A19D733747 /* Foundation.ttf */,
|
||||
14A8E7A581874AC5AE37321B /* Ionicons.ttf */,
|
||||
6018193EEFF04AFB94788DB4 /* MaterialCommunityIcons.ttf */,
|
||||
23E7B884B72847E1BD8C9A3F /* MaterialIcons.ttf */,
|
||||
5A82E560B3B349BCBA066A32 /* Octicons.ttf */,
|
||||
F252FD91C3D64473B4C60F10 /* SimpleLineIcons.ttf */,
|
||||
C62F12D380CC4FCCA957FB0E /* Zocial.ttf */,
|
||||
1D8A22768E9A4EDFB1344277 /* Entypo.ttf */,
|
||||
96B91E481AAE4734A146E2CB /* EvilIcons.ttf */,
|
||||
52E64789CFED474A904412E4 /* Feather.ttf */,
|
||||
0803AEAB4D2D4C918F0B3914 /* FontAwesome.ttf */,
|
||||
B5536E1410B84DBA8A76DA54 /* Foundation.ttf */,
|
||||
B576801919AA42499A071B91 /* Ionicons.ttf */,
|
||||
A5A4B52BB72544BFB7EA76E0 /* MaterialCommunityIcons.ttf */,
|
||||
6CF599F9FCFF402C88F87549 /* MaterialIcons.ttf */,
|
||||
EFE018550FEF481D9859B10F /* Octicons.ttf */,
|
||||
18DBE68A84244BF89A7A4BB7 /* SimpleLineIcons.ttf */,
|
||||
D6C36FEC85D8491696402FF7 /* Zocial.ttf */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
|
@ -783,6 +816,27 @@
|
|||
remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2D16E6721FA4F8DC00B85C8A /* libRCTBlob-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTBlob-tvOS.a";
|
||||
remoteRef = 2D16E6711FA4F8DC00B85C8A /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2D16E6841FA4F8DC00B85C8A /* libfishhook.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libfishhook.a;
|
||||
remoteRef = 2D16E6831FA4F8DC00B85C8A /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
2D16E6861FA4F8DC00B85C8A /* libfishhook-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libfishhook-tvOS.a";
|
||||
remoteRef = 2D16E6851FA4F8DC00B85C8A /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
3DAD3E841DF850E9000B6D8A /* libRCTImage-tvOS.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
@ -881,10 +935,10 @@
|
|||
remoteRef = 5E9157321DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation-tvOS.a */ = {
|
||||
5E9157351DD0AC6500FF2AA8 /* libRCTAnimation.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = "libRCTAnimation-tvOS.a";
|
||||
path = libRCTAnimation.a;
|
||||
remoteRef = 5E9157341DD0AC6500FF2AA8 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
|
@ -925,17 +979,17 @@
|
|||
files = (
|
||||
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
|
||||
13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
|
||||
2C1EA3D00E644F1FBCCD3BAD /* Entypo.ttf in Resources */,
|
||||
716BBC17946A40AEADDA4DF8 /* EvilIcons.ttf in Resources */,
|
||||
70A404B0443A43F09CBD76BB /* Feather.ttf in Resources */,
|
||||
F906AEFBED844A6598DEB460 /* FontAwesome.ttf in Resources */,
|
||||
098AA93AB8B34B318AA6BC41 /* Foundation.ttf in Resources */,
|
||||
94C6D585268144C1A9330029 /* Ionicons.ttf in Resources */,
|
||||
49E8A1E35B374FB3B943AD3D /* MaterialCommunityIcons.ttf in Resources */,
|
||||
CAFFE5900D9C4C70A2145F85 /* MaterialIcons.ttf in Resources */,
|
||||
917E77D1F90B4D008CC6BF88 /* Octicons.ttf in Resources */,
|
||||
76AE6A24B8F043DE8A59C1DB /* SimpleLineIcons.ttf in Resources */,
|
||||
2B443C877B684BAEBC7A26F6 /* Zocial.ttf in Resources */,
|
||||
AF703E8EC1D04ACBA9B850EE /* Entypo.ttf in Resources */,
|
||||
1AE068178E21459E886D9917 /* EvilIcons.ttf in Resources */,
|
||||
1218D0AAFFFD4DA2AEA2D0AD /* Feather.ttf in Resources */,
|
||||
4F14CAF5592D44118B87A899 /* FontAwesome.ttf in Resources */,
|
||||
864518F1A79C41D6A1FE8F85 /* Foundation.ttf in Resources */,
|
||||
76857B476BDF44D281435ADD /* Ionicons.ttf in Resources */,
|
||||
5B16C41E27D940CA85B76BCB /* MaterialCommunityIcons.ttf in Resources */,
|
||||
3B84831B113A43F9B97AA014 /* MaterialIcons.ttf in Resources */,
|
||||
193523D2E0744E5FB1416425 /* Octicons.ttf in Resources */,
|
||||
091E302C37364569A595F6B3 /* SimpleLineIcons.ttf in Resources */,
|
||||
65B1CA66024A426E8783DC32 /* Zocial.ttf in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -1074,7 +1128,7 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
);
|
||||
};
|
||||
|
@ -1101,7 +1155,7 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
);
|
||||
};
|
||||
|
@ -1124,7 +1178,7 @@
|
|||
VERSIONING_SYSTEM = "apple-generic";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
);
|
||||
};
|
||||
|
@ -1146,7 +1200,7 @@
|
|||
VERSIONING_SYSTEM = "apple-generic";
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
);
|
||||
};
|
||||
|
@ -1182,7 +1236,7 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
);
|
||||
};
|
||||
|
@ -1218,7 +1272,7 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-fast-image/ios/FastImage/**",
|
||||
"$(SRCROOT)/../node_modules/react-native-vector-icons/RNVectorIconsManager",
|
||||
);
|
||||
};
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "example",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"start": "react-native start",
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^16.3.0-alpha.1",
|
||||
"react-native": "0.54.1",
|
||||
"react-native-fast-image": "file:../react-native-fast-image-2.2.5.tgz",
|
||||
"react-native-image-progress": "^1.1.0",
|
||||
"react-native-vector-icons": "^4.4.2",
|
||||
"react-navigation": "^1.0.0-beta.21",
|
||||
"react-timeout": "^1.0.1",
|
||||
"uuid": "^3.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-jest": "21.2.0",
|
||||
"babel-preset-react-native": "4.0.0",
|
||||
"jest": "21.2.1",
|
||||
"react-test-renderer": "16.0.0"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
}
|
||||
}
|