小编Rez*_*eza的帖子

安装Carthage时出现"错误:无法锁定配置文件.git/config:权限被拒绝"的错误

我想使用brew install carthage命令在我的Mac OS上安装carthage .但是,我收到以下错误:

touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart/.git/FETCH_HEAD: Permission denied
touch: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/.git/FETCH_HEAD: Permission denied
fatal: Unable to create '/usr/local/Homebrew/.git/index.lock': Permission denied
error: could not lock config file .git/config: Permission denied
Warning: carthage 0.26.2 is already installed, it's just not linked.
You can use `brew link carthage` to link this version.
Run Code Online (Sandbox Code Playgroud)

我使用时也遇到以下错误sudo brew install carthage:

Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does …
Run Code Online (Sandbox Code Playgroud)

macos homebrew carthage

21
推荐指数
4
解决办法
3万
查看次数

Picker无法接受borderRadius表单样式

我是新的反应本地人.我需要一个从file.js读取的下拉列表.我使用的选择器如下:

<Picker
style={Commonstyles.dropdownStyle}
mode="dropdown"
selectedValue={this.state.PickerValueHolderCity}
onValueChange={(itemValue, itemIndex) => this.setState({PickerValueHolderCity: itemValue})}>
{ console.log("mydataxxx", mydata) && this.renderPickerItemsCity(mydata)}

</Picker>
Run Code Online (Sandbox Code Playgroud)

一切都适合我.我的问题是我需要应用具有灰色背景和曲线年龄的样式.但是,它只显示没有曲线边框的灰色背景.

我使用了以下样式:

  dropdownStyle: {
    //flex: 1,
    backgroundColor: '#ecf0f1',
    marginBottom: 7,
    padding: 7,
    alignSelf: "stretch",
    // Set border width.
    borderWidth: 1,
    // Set border Hex Color Code Here.
    borderColor: '#bdc3c7',
    // Set border Radius.
    borderRadius: 10 ,
    //  marginBottom: 10,
  },
Run Code Online (Sandbox Code Playgroud)

你能帮我在挑选器上应用以下风格吗?我应该提一下,我的风格在我的文本框上运行良好.

reactjs react-native

5
推荐指数
1
解决办法
3478
查看次数

将焦点自动更改为react native中的下一个TextInput

我正在开发一个反应原生的应用程序.我有三个TextInput框如下:

在此输入图像描述

如果用户插入数字,我需要自动更改TextInput框的焦点.然后,只要他/她插入最后一个数字,就应该执行一个功能.

这是我的代码:

  <View style={styles.squareContainer}>
                <View style={styles.square}>
                    <TextInput
                      onChangeText={(oldPassword) => this.setState({oldPassword})}
                      style={{flex:1}}
                      ref="1"
                      keyboardType={'numeric'}
                      style={styles.inputText}
                      maxLength = {1}
                      underlineColorAndroid='rgba(0,0,0,0)'
                      numberOfLines={1}
                      secureTextEntry={true}
                      onSubmitEditing={() => this.focusNextField('2')}


                    />
                </View>
                <View style={styles.square}>
                    <TextInput
                      style={{flex:1}}
                      ref="2"
                      onChangeText={(oldPassword) => this.setState({oldPassword})}
                      keyboardType={'numeric'}
                      maxLength = {1}
                      style={styles.inputText}
                      underlineColorAndroid='rgba(0,0,0,0)'
                      numberOfLines={1}
                      secureTextEntry={true}
                      onSubmitEditing={this.maxLength?1:() => this.focusNextField('3')}


                    />
                </View>
                <View style={styles.square}>
                    <TextInput
                      style={{flex:1}}
                      ref="3"
                      onChangeText={(oldPassword) => this.setState({oldPassword})}
                      returnKeyType='next'
                      keyboardType={'numeric'}
                      style={styles.inputText}
                      underlineColorAndroid='rgba(0,0,0,0)'
                      numberOfLines={1}
                      secureTextEntry={true}


                    />
                </View>
              </View>
Run Code Online (Sandbox Code Playgroud)

换句话说,例如,如果用户想要插入153,他/她应该在第一个TextInput中插入1,然后光标和焦点应自动替换为下一个TextInput,并且她/他可以插入5并最终通过移动焦点并且对第三个TextInput进行了诅咒,他/她可以插入3.只要他插入3,我就需要执行this.triggerFunction().我试图使用以下技巧,但它没有用:

onSubmitEditing={this.maxLength?1:() => this.focusNextField('3')}
Run Code Online (Sandbox Code Playgroud)

你能帮我解决这个问题吗?提前致谢.

textinput reactjs react-native

5
推荐指数
1
解决办法
3694
查看次数

没有找到团队“XXX”的具有 AppStore 连接访问权限的帐户

我正在开发一个带有本机反应的应用程序,我想使用 Xcode 制作一个 Testflight。我正在使用 Xcode 10.0 (10A255) 版本。我还将分发证书添加到我的钥匙串中。我的问题是,在成功存档后,只要我想验证我的应用程序,它就会显示以下错误:

没有找到团队“XXX”的具有 AppStore 连接访问权限的帐户

到目前为止我所做的:

1-关闭Xcode并执行: rm -fr ~/Library/Developer/Xcode/DerivedData/

2- 删除并添加我的 Apple ID 帐户

3-从头开始重新启动一切

4- 我检查了我的应用程序图标,它们很好

5- 我已经在 iTunes 和 AppStore 中使用相同的 Apple ID 登录。

以上测量均无助于我解决我的问题。请帮帮我好吗?

xcode ios testflight react-native

3
推荐指数
1
解决办法
2811
查看次数

在新窗口中打开弹出窗口

我的网站上有一些弹出窗口,我想在新窗口中打开下一个弹出窗口.但是,它当前在同一窗口中打开.我怎样才能解决这个问题?

function pop_up(url) {
    newwindow = window.open(url, 'name', 'height=517,width=885,scrollbars=yes,
        toolbar=no,menubar=no,resizable=yes,location=no,directories=no,status=no,
        titlebar=no,left=400,top=120');

    if (window.focus) { newwindow.focus() }
        return false;
}

Page.ClientScript.RegisterStartupScript(GetType(), "popup", 
    "pop_up('" + "PopUpEmailing.aspx" + "');", true);
Run Code Online (Sandbox Code Playgroud)

javascript asp.net popup

1
推荐指数
1
解决办法
1919
查看次数

如何在某些屏幕上禁用android后退按钮

我只想在某些页面中禁用android后退按钮。我使用以下代码:

  componentWillUnmount(){
      //For disabling the back button on cellphone
      BackHandler.removeEventListener('hardwareBackPress', this.handleBackButton);
    }
    componentWillMount() {
         ParkToolbar.init( this );
    }

    //For disabling the back button on cellphone
    handleBackButton() {
        ToastAndroid.show('you cannot return', ToastAndroid.SHORT);
        return true;
    }

    componentDidMount() {
        toolbarActiveItem = this.state.user; 
        ParkToolbar.setActiveItem(this.props.navigation.state.params.activeSection);

        //For disabling the back button on cellphone
        BackHandler.addEventListener('hardwareBackPress', this.handleBackButton);
    }
Run Code Online (Sandbox Code Playgroud)

问题是,当我在程序的一页(屏幕)中使用代码时,后退按钮将在应用程序每一部分的所有页面(屏幕)中禁用。您是否知道如何仅对单个页面(屏幕)禁用后退按钮的方式进行管理?

更新: 我还用BackAndroid测试了代码,并发生了相同的问题。

reactjs react-native

1
推荐指数
2
解决办法
1761
查看次数