Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sentionheader滑动时消失 #66

Closed
iOSHw opened this issue Jan 19, 2018 · 7 comments
Closed

sentionheader滑动时消失 #66

iOSHw opened this issue Jan 19, 2018 · 7 comments

Comments

@iOSHw
Copy link

iOSHw commented Jan 19, 2018

simulator screen shot - iphone 8 - 2018-01-19 at 16 09 20

@bolan9999
Copy link
Owner

先点个star再说吧,我感觉你的问题都是些很低级的问题。

@iOSHw
Copy link
Author

iOSHw commented Jan 19, 2018

低级,但是确实会遇到不是吗?

@bolan9999
Copy link
Owner

你打开LargeListSample3出这个问题吗 ?

@iOSHw
Copy link
Author

iOSHw commented Jan 19, 2018

<LargeList
// style={this.props.style}
style={{ flex:1 }}
ref={ref => (this.largeList = ref)}
//numberOfRowsInSection={(section)=>this.countNumberOfRowsInSection(section)}
numberOfRowsInSection={(section)=>this.state.studentArray[section].data.length}
heightForCell={() => 60}
//refreshing={this.state.refreshing}
renderCell={this.renderItem.bind(this)}
//numberOfCellPoolSize={height*3/60+0.5}
//safeMargin={height}
numberOfSections={()=>this.state.studentArray.length}
renderSection={this._renderSection.bind(this)}
heightForSection={() => 40}
renderEmpty={() =>
<Text style={{ fontSize: 20, alignSelf: "center" }}>Empty}
/>

代码哪里存在问题吗 ? 初始是正常的, 多滑几次 就出现空白 位置还是在

@bolan9999
Copy link
Owner

我知道了,你这个Section太密了,默认的6个不够用,你要设置numberOfSectionPoolSize=15. 文档里面写得很清楚,应当设置成

可视区域高度+2*safeMargin 在最坏情况下需要的Section数量。

@bolan9999
Copy link
Owner

因为不能创建视图,所以,具体的属性需要你自己设置

@bolan9999
Copy link
Owner

closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants