我让pod工作正常,直到我尝试安装另一个pod并开始出现一个奇怪的错误,我没有做任何更新,并且直到最近才完美运行.
Podfile
platform :ios, '8.0'
target 'Wireless' do
pod 'TapjoySDK', '~> 10.2'
pod 'MBProgressHUD', '~> 0.9.1'
pod 'IQDropDownTextField',
pod 'PayPal-iOS-SDK',
pod 'DLRadioButton'
end
Run Code Online (Sandbox Code Playgroud)
我收到的错误消息
SyntaxError - /Users/amir/Desktop/Wireless/Podfile:10: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
pod 'PayPal-iOS-SDK',
^
/Users/amir/Desktop/Wireless/Podfile:10: syntax error, unexpected ',', ex pecting keyword_end
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.3/lib/cocoapods-core/podfile.rb:254:in `eval'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.3/lib/cocoapods-core/podfile.rb:254:in `block in from_ruby'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.3/lib/cocoapods-core/podfile.rb:51:in `instance_eval'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.3/lib/cocoapods-core/podfile.rb:51:in `initialize'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.3/lib/cocoapods-core/podfile.rb:251:in `new'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.3/lib/cocoapods-core/podfile.rb:251:in `from_ruby'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-core-0.36.3/lib/cocoapods-core/podfile.rb:227:in `from_file'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.3/lib/cocoapods/config.rb:176:in `podfile'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.3/lib/cocoapods/command.rb:109:in `verify_podfile_exists!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.3/lib/cocoapods/command/project.rb:100:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-0.8.1/lib/claide/command.rb:312:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.3/lib/cocoapods/command.rb:46:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-0.36.3/bin/pod:44:in `<top (required)>'
/usr/bin/pod:23:in `load'
/usr/bin/pod:23:in …Run Code Online (Sandbox Code Playgroud) 我正在使用 KeyboardAvoidingView 通过键盘向上移动按钮,在其中我有一个滚动视图,keybordShouldPersistTaps 设置为始终,在滚动视图中,我使用的是 Formik 表单。我仍然需要双击一个按钮两次才能让键盘关闭并提交我的数据。我一直试图在没有运气的情况下手动关闭/处理滚动视图上的键盘,我应该尝试其他任何方法吗?
<KeyboardAvoidingView style={{ flex: 1 }} behavior={'padding'}>
<ScrollView contentContainerStyle={{ flexGrow: 1 }} keyboardShouldPersistTaps={'always'}>
<Formik
initialValues={this.state}
validationSchema={this.schema}
onSubmit={(values, actions) => {
actions.setSubmitting(false);
}}
render={({ handleBlur, handleChange, handleSubmit, values, isValid }) => {
return (
<View style={onboardingStyles.inputContainer}>
<View>
<Text theme={theme} style={onboardingStyles.headerText}>
{i18n.t('phone_verify')}
</Text>
<TextInput
activeHighlight
value={RizeCore.util.formatPhoneDOM(values.phone)}
onChangeText={(val: string) => {
const phone = RizeCore.util.parseOutDigits(val, 10);
return handleChange('phone')(phone);
}}
onBlur={() => handleBlur('phone')}
label={i18n.t('phone_number')}
style={onboardingStyles.input}
labelStyle={{ color: 'white' }}
keyboardType={Platform.OS === 'web' ? 'default' : 'number-pad'}
returnKeyType="done"
/>
</View> …Run Code Online (Sandbox Code Playgroud)