mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 04:35:36 +08:00
[React Native] Remove animated GIFs from TicTacToe example
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
|
||||||
144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 144C5F681AC3E5D800B004E7 /* libReact.a */; };
|
144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 144C5F681AC3E5D800B004E7 /* libReact.a */; };
|
||||||
58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58C5724D1AA6224400CDF9C8 /* libRCTText.a */; };
|
58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58C5724D1AA6224400CDF9C8 /* libRCTText.a */; };
|
||||||
|
832044981B492C2500E297FC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832044951B492C1E00E297FC /* libRCTSettings.a */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@@ -38,6 +39,13 @@
|
|||||||
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
|
remoteGlobalIDString = 58B5119B1A9E6C1200147676;
|
||||||
remoteInfo = RCTText;
|
remoteInfo = RCTText;
|
||||||
};
|
};
|
||||||
|
832044941B492C1E00E297FC /* PBXContainerItemProxy */ = {
|
||||||
|
isa = PBXContainerItemProxy;
|
||||||
|
containerPortal = 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */;
|
||||||
|
proxyType = 2;
|
||||||
|
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||||
|
remoteInfo = RCTSettings;
|
||||||
|
};
|
||||||
/* End PBXContainerItemProxy section */
|
/* End PBXContainerItemProxy section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
@@ -51,6 +59,7 @@
|
|||||||
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = TicTacToe/main.m; sourceTree = "<group>"; };
|
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = TicTacToe/main.m; sourceTree = "<group>"; };
|
||||||
144C5F631AC3E5D800B004E7 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../../React/React.xcodeproj; sourceTree = "<group>"; };
|
144C5F631AC3E5D800B004E7 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = ../../React/React.xcodeproj; sourceTree = "<group>"; };
|
||||||
587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../../Libraries/Text/RCTText.xcodeproj; sourceTree = "<group>"; };
|
587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = ../../Libraries/Text/RCTText.xcodeproj; sourceTree = "<group>"; };
|
||||||
|
8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = ../../Libraries/Settings/RCTSettings.xcodeproj; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -61,6 +70,7 @@
|
|||||||
144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */,
|
144C5F691AC3E5E300B004E7 /* libReact.a in Frameworks */,
|
||||||
1341803E1AA91802003F314A /* libRCTImage.a in Frameworks */,
|
1341803E1AA91802003F314A /* libRCTImage.a in Frameworks */,
|
||||||
58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */,
|
58C572511AA6229D00CDF9C8 /* libRCTText.a in Frameworks */,
|
||||||
|
832044981B492C2500E297FC /* libRCTSettings.a in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@@ -101,6 +111,7 @@
|
|||||||
children = (
|
children = (
|
||||||
144C5F631AC3E5D800B004E7 /* React.xcodeproj */,
|
144C5F631AC3E5D800B004E7 /* React.xcodeproj */,
|
||||||
134180381AA917ED003F314A /* RCTImage.xcodeproj */,
|
134180381AA917ED003F314A /* RCTImage.xcodeproj */,
|
||||||
|
8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */,
|
||||||
587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */,
|
587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */,
|
||||||
);
|
);
|
||||||
name = Libraries;
|
name = Libraries;
|
||||||
@@ -114,6 +125,14 @@
|
|||||||
name = Products;
|
name = Products;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
832044901B492C1E00E297FC /* Products */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
832044951B492C1E00E297FC /* libRCTSettings.a */,
|
||||||
|
);
|
||||||
|
name = Products;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
83CBB9F61A601CBA00E9B192 = {
|
83CBB9F61A601CBA00E9B192 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -178,6 +197,10 @@
|
|||||||
ProductGroup = 134180391AA917ED003F314A /* Products */;
|
ProductGroup = 134180391AA917ED003F314A /* Products */;
|
||||||
ProjectRef = 134180381AA917ED003F314A /* RCTImage.xcodeproj */;
|
ProjectRef = 134180381AA917ED003F314A /* RCTImage.xcodeproj */;
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
ProductGroup = 832044901B492C1E00E297FC /* Products */;
|
||||||
|
ProjectRef = 8320448F1B492C1E00E297FC /* RCTSettings.xcodeproj */;
|
||||||
|
},
|
||||||
{
|
{
|
||||||
ProductGroup = 58C572481AA6224300CDF9C8 /* Products */;
|
ProductGroup = 58C572481AA6224300CDF9C8 /* Products */;
|
||||||
ProjectRef = 587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */;
|
ProjectRef = 587650DA1A9EB0DB008B8F17 /* RCTText.xcodeproj */;
|
||||||
@@ -216,6 +239,13 @@
|
|||||||
remoteRef = 58C5724C1AA6224400CDF9C8 /* PBXContainerItemProxy */;
|
remoteRef = 58C5724C1AA6224400CDF9C8 /* PBXContainerItemProxy */;
|
||||||
sourceTree = BUILT_PRODUCTS_DIR;
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
};
|
};
|
||||||
|
832044951B492C1E00E297FC /* libRCTSettings.a */ = {
|
||||||
|
isa = PBXReferenceProxy;
|
||||||
|
fileType = archive.ar;
|
||||||
|
path = libRCTSettings.a;
|
||||||
|
remoteRef = 832044941B492C1E00E297FC /* PBXContainerItemProxy */;
|
||||||
|
sourceTree = BUILT_PRODUCTS_DIR;
|
||||||
|
};
|
||||||
/* End PBXReferenceProxy section */
|
/* End PBXReferenceProxy section */
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
/* Begin PBXResourcesBuildPhase section */
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
var React = require('react-native');
|
var React = require('react-native');
|
||||||
var {
|
var {
|
||||||
AppRegistry,
|
AppRegistry,
|
||||||
Image,
|
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
Text,
|
Text,
|
||||||
TouchableHighlight,
|
TouchableHighlight,
|
||||||
@@ -118,17 +117,6 @@ var Cell = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
imageStyle() {
|
|
||||||
switch (this.props.player) {
|
|
||||||
case 1:
|
|
||||||
return styles.imageX;
|
|
||||||
case 2:
|
|
||||||
return styles.imageO;
|
|
||||||
default:
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
textContents() {
|
textContents() {
|
||||||
switch (this.props.player) {
|
switch (this.props.player) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -140,17 +128,6 @@ var Cell = React.createClass({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
imageContents() {
|
|
||||||
switch (this.props.player) {
|
|
||||||
case 1:
|
|
||||||
return 'http://www.picgifs.com/alphabets/alphabets/children-5/alphabets-children-5-277623.gif';
|
|
||||||
case 2:
|
|
||||||
return 'http://www.picgifs.com/alphabets/alphabets/children-5/alphabets-children-5-730492.gif';
|
|
||||||
default:
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<TouchableHighlight
|
<TouchableHighlight
|
||||||
@@ -158,7 +135,9 @@ var Cell = React.createClass({
|
|||||||
underlayColor="transparent"
|
underlayColor="transparent"
|
||||||
activeOpacity={0.5}>
|
activeOpacity={0.5}>
|
||||||
<View style={[styles.cell, this.cellStyle()]}>
|
<View style={[styles.cell, this.cellStyle()]}>
|
||||||
<Image source={{uri: this.imageContents()}} style={this.imageStyle()}/>
|
<Text style={[styles.cellText, this.textStyle()]}>
|
||||||
|
{this.textContents()}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</TouchableHighlight>
|
</TouchableHighlight>
|
||||||
);
|
);
|
||||||
@@ -304,17 +283,6 @@ var styles = StyleSheet.create({
|
|||||||
color: '#b9dc2f',
|
color: '#b9dc2f',
|
||||||
},
|
},
|
||||||
|
|
||||||
// CELL IMAGE
|
|
||||||
|
|
||||||
imageX: {
|
|
||||||
width: 34,
|
|
||||||
height: 42,
|
|
||||||
},
|
|
||||||
imageO: {
|
|
||||||
width: 45,
|
|
||||||
height: 41,
|
|
||||||
},
|
|
||||||
|
|
||||||
// GAME OVER
|
// GAME OVER
|
||||||
|
|
||||||
overlay: {
|
overlay: {
|
||||||
|
|||||||
Reference in New Issue
Block a user