Skip to content

Commit 28a36e9

Browse files
duom青源duom青源
authored andcommitted
feat: 修改iOS调用原生为UIManager
1 parent 6a14566 commit 28a36e9

File tree

6 files changed

+249
-116
lines changed

6 files changed

+249
-116
lines changed

example/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby File.read(File.join(__dir__, '.ruby-version')).strip
4+
# ruby File.read(File.join(__dir__, '.ruby-version')).strip
55

66
gem 'cocoapods', '~> 1.11', '>= 1.11.3'

example/Gemfile.lock

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
activesupport (7.1.3.2)
9+
base64
10+
bigdecimal
11+
concurrent-ruby (~> 1.0, >= 1.0.2)
12+
connection_pool (>= 2.2.5)
13+
drb
14+
i18n (>= 1.6, < 2)
15+
minitest (>= 5.1)
16+
mutex_m
17+
tzinfo (~> 2.0)
18+
addressable (2.8.6)
19+
public_suffix (>= 2.0.2, < 6.0)
20+
algoliasearch (1.27.5)
21+
httpclient (~> 2.8, >= 2.8.3)
22+
json (>= 1.5.1)
23+
atomos (0.1.3)
24+
base64 (0.2.0)
25+
bigdecimal (3.1.7)
26+
claide (1.1.0)
27+
cocoapods (1.15.2)
28+
addressable (~> 2.8)
29+
claide (>= 1.0.2, < 2.0)
30+
cocoapods-core (= 1.15.2)
31+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
32+
cocoapods-downloader (>= 2.1, < 3.0)
33+
cocoapods-plugins (>= 1.0.0, < 2.0)
34+
cocoapods-search (>= 1.0.0, < 2.0)
35+
cocoapods-trunk (>= 1.6.0, < 2.0)
36+
cocoapods-try (>= 1.1.0, < 2.0)
37+
colored2 (~> 3.1)
38+
escape (~> 0.0.4)
39+
fourflusher (>= 2.3.0, < 3.0)
40+
gh_inspector (~> 1.0)
41+
molinillo (~> 0.8.0)
42+
nap (~> 1.0)
43+
ruby-macho (>= 2.3.0, < 3.0)
44+
xcodeproj (>= 1.23.0, < 2.0)
45+
cocoapods-core (1.15.2)
46+
activesupport (>= 5.0, < 8)
47+
addressable (~> 2.8)
48+
algoliasearch (~> 1.0)
49+
concurrent-ruby (~> 1.1)
50+
fuzzy_match (~> 2.0.4)
51+
nap (~> 1.0)
52+
netrc (~> 0.11)
53+
public_suffix (~> 4.0)
54+
typhoeus (~> 1.0)
55+
cocoapods-deintegrate (1.0.5)
56+
cocoapods-downloader (2.1)
57+
cocoapods-plugins (1.0.0)
58+
nap
59+
cocoapods-search (1.0.1)
60+
cocoapods-trunk (1.6.0)
61+
nap (>= 0.8, < 2.0)
62+
netrc (~> 0.11)
63+
cocoapods-try (1.2.0)
64+
colored2 (3.1.2)
65+
concurrent-ruby (1.2.3)
66+
connection_pool (2.4.1)
67+
drb (2.2.1)
68+
escape (0.0.4)
69+
ethon (0.16.0)
70+
ffi (>= 1.15.0)
71+
ffi (1.16.3)
72+
fourflusher (2.3.1)
73+
fuzzy_match (2.0.4)
74+
gh_inspector (1.1.3)
75+
httpclient (2.8.3)
76+
i18n (1.14.4)
77+
concurrent-ruby (~> 1.0)
78+
json (2.7.2)
79+
minitest (5.22.3)
80+
molinillo (0.8.0)
81+
mutex_m (0.2.0)
82+
nanaimo (0.3.0)
83+
nap (1.1.0)
84+
netrc (0.11.0)
85+
nkf (0.2.0)
86+
public_suffix (4.0.7)
87+
rexml (3.2.6)
88+
ruby-macho (2.5.1)
89+
typhoeus (1.4.1)
90+
ethon (>= 0.9.0)
91+
tzinfo (2.0.6)
92+
concurrent-ruby (~> 1.0)
93+
xcodeproj (1.24.0)
94+
CFPropertyList (>= 2.3.3, < 4.0)
95+
atomos (~> 0.1.3)
96+
claide (>= 1.0.2, < 2.0)
97+
colored2 (~> 3.1)
98+
nanaimo (~> 0.3.0)
99+
rexml (~> 3.2.4)
100+
101+
PLATFORMS
102+
ruby
103+
104+
DEPENDENCIES
105+
cocoapods (~> 1.11, >= 1.11.3)
106+
107+
BUNDLED WITH
108+
2.1.4

example/ios/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ PODS:
329329
- React-jsinspector (0.71.4)
330330
- React-logger (0.71.4):
331331
- glog
332-
- react-native-variable-text-input (0.1.0):
332+
- react-native-variable-text-input (0.14.0):
333333
- React-Core
334334
- React-perflogger (0.71.4)
335335
- React-RCTActionSheet (0.71.4):
@@ -606,7 +606,7 @@ SPEC CHECKSUMS:
606606
React-jsiexecutor: d6b7fa9260aa3cb40afee0507e3bc1d17ecaa6f2
607607
React-jsinspector: 1f51e775819199d3fe9410e69ee8d4c4161c7b06
608608
React-logger: 0d58569ec51d30d1792c5e86a8e3b78d24b582c6
609-
react-native-variable-text-input: ce0fb81e6db845f103557b1bb10cfd8d373647c1
609+
react-native-variable-text-input: a77966d23c54ab56c4ff381a8613ab154432bf5b
610610
React-perflogger: 0bb0522a12e058f6eb69d888bc16f40c16c4b907
611611
React-RCTActionSheet: bfd675a10f06a18728ea15d82082d48f228a213a
612612
React-RCTAnimation: 2fa220b2052ec75b733112aca39143d34546a941
@@ -626,4 +626,4 @@ SPEC CHECKSUMS:
626626

627627
PODFILE CHECKSUM: 43569e7a31a8524b23dd56412400f293ae2c924d
628628

629-
COCOAPODS: 1.14.3
629+
COCOAPODS: 1.15.2

example/src/App.tsx

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
VariableTextInputView,
1515
} from 'react-native-variable-text-input';
1616
import { EmojiList } from './EmojiList';
17+
import type { IInputEmojiDataType } from './assets';
1718
export const App = () => {
1819
const inPutRef = React.createRef<IATTextViewBase>();
1920
const [keyBoardHeight, setKeyBoardHeight] = useState<number>(0);
@@ -52,24 +53,30 @@ export const App = () => {
5253
//todo
5354
console.log('onMentions===>', data);
5455
};
55-
const onTouchEmView = () => {
56-
setKeyBoardHeight(0);
57-
inPutRef.current?.blur();
58-
};
56+
// const onTouchEmView = () => {
57+
// setKeyBoardHeight(0);
58+
// inPutRef.current?.blur();
59+
// };
5960
const onTouchContro = () => {
6061
!showEmoji && inPutRef.current?.blur();
6162
showEmoji && inPutRef.current?.focus();
6263
setShowEmoji(!showEmoji);
6364
};
65+
const onPressText = () => {
66+
inPutRef.current?.changeAttributedText([{ type: 0, text: 'eeeeeee' }]);
67+
};
68+
const onSelect = (data: IInputEmojiDataType) => {
69+
//todo
70+
inPutRef.current?.changeAttributedText([
71+
{ type: 0, text: 'eeeeeee' },
72+
data,
73+
]);
74+
};
6475
return (
6576
<View style={styles.container}>
66-
<View style={{ flex: 1, width: '100%' }}>
67-
<TouchableOpacity
68-
onPress={onTouchEmView}
69-
activeOpacity={1}
70-
style={{ flex: 1 }}
71-
/>
72-
</View>
77+
<Text onPress={onPressText} style={{ marginTop: 200, marginBottom: 50 }}>
78+
{'测试方法'}
79+
</Text>
7380
<View>
7481
<View style={styles.hor}>
7582
<VariableTextInputView
@@ -109,7 +116,11 @@ export const App = () => {
109116
<Text style={styles.sendText}>SEND</Text>
110117
</View>
111118
</View>
112-
<EmojiList numColumns={6} keyBoardHeight={keyBoardHeight} />
119+
<EmojiList
120+
numColumns={6}
121+
keyBoardHeight={keyBoardHeight}
122+
onSelect={onSelect}
123+
/>
113124
</View>
114125
</View>
115126
);
@@ -118,8 +129,6 @@ export default App;
118129
const styles = StyleSheet.create({
119130
container: {
120131
flex: 1,
121-
alignItems: 'center',
122-
justifyContent: 'flex-end',
123132
},
124133
box: {
125134
backgroundColor: '#000',

0 commit comments

Comments
 (0)