简体   繁体   English

自动大小表格视图中嵌套的水平collectionview单元格的扩展高度使行重新加载单元格时使collection view滚动重置

[英]nested horizontal collectionview in auto size tableview cell exanding height make collection view scroll reset when reload cell for row accured

i have table view for showing product detail and each part is tableview cell, 我有用于显示产品详细信息的表格视图,每个部分都是表格视图单元格,

in one of my tableview cell that is showing sizes and stores that has that size like this 在我的一个显示尺寸的tableview单元格中,并存储具有该尺寸的像这样 像这样 and 这个

when the user click on one of collection view items tableview expand to show stores. 当用户单击集合视图项之一的tableview时,将展开以显示商店。

if i update root tableviewcell constraints i need to reload that cell after reloading collection scroll will rest 如果我更新根tableviewcell约束,我需要在重新加载集合滚动后重新加载该单元格

i tried beginUpdates and endUpdates for root tableview after changing constraint it will work but in some situation it will show a blank cell what's wrong in my idea 我在更改约束后尝试了root tableview的beginUpdates和endUpdates,它可以工作,但在某些情况下,它将显示空白单元格,这是我的想法出了问题

in summary : how to expand tableview cell without reloading and refresh cell view .i think both questions are equal 总结:如何在不重新加载和刷新单元格视图的情况下扩展tableview单元格。我认为两个问题都相同

更改tableView中的约束,并添加模型以对当前选定的collectionViewCell进行建模,并在collectionViewCell awakeFromNib方法中不带动画地滚动至默认值,这是默认值0,这意味着将不会发生动画[我的意思是这里的tableView模型。显示每个tableViewCell]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM