在编写组件时,我的
IOS模拟器突然出现了一个非常奇怪的错误:“无法在可用视图之外调整当前堆栈顶部”
这是我的代码:
var Badge = require('./badge'); var Separator = require('./helpers/seperator'); var View = React.View; var StyleSheet = React.StyleSheet; var ScrollView = React.ScrollView; var Text = React.Text; var Profile = React.createClass({ _getRowTitle: function (userInfo,item) { item = item.replace('_',' '); return item[0] ? item[0].toUpperCase() + item.slice(1) : item; },render: function () { var userInfo = this.props.userInfo; var topicArr = ['followers','following','email','bio']; var list = topicArr.map((item,index) => { return ( <View key={index}> <View> <Text> {this._getRowTitle(userInfo,item)} </Text> <Text> {userInfo[item]} </Text> </View> <Seperator /> </View> ); } }); return ( <ScrollView style={styles.container}> <Badge userInfo={this.props.userInfo} /> {list} </ScrollView> ); } });
有谁知道这个错误来自哪里?