Skip to content

Commit e5b88a3

Browse files
committed
Merge branch 'develop'
2 parents e48afa4 + 62e7120 commit e5b88a3

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

Sources/ScrollStackController/ScrollStackRow.swift

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,28 +230,24 @@ open class ScrollStackRow: UIView, UIGestureRecognizerDelegate {
230230
return
231231
}
232232

233-
contentView.removeFromSuperview()
234233
contentView.removeFromSuperview()
235234

236235
addSubview(contentView)
237236
addSubview(separatorView)
238-
239-
askForCutomizedSizeOfContentView(animated: false)
240-
237+
241238
didUpdateContentViewContraints()
242239
didUpdateSeparatorViewContraintsIfNeeded()
243240
didUpdateSeparatorAxis()
244241

245242
applyParentStackAttributes()
246243

247244
separatorView.isHidden = isSeparatorHidden
245+
setNeedsUpdateConstraints()
248246
}
249247

250-
open override func layoutSubviews() {
251-
super.layoutSubviews()
252-
253-
// called the event to update the height of the row.
248+
open override func updateConstraints() {
254249
askForCutomizedSizeOfContentView(animated: false)
250+
super.updateConstraints()
255251
}
256252

257253
private func applyParentStackAttributes() {

Sources/ScrollStackController/Support/ScrollStackRowAnimator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ internal class ScrollStackRowAnimator {
116116

117117
/// Target row if animatable.
118118
private var animatableRow: ScrollStackRowAnimatable? {
119-
return targetRow.controller as? ScrollStackRowAnimatable
119+
return (targetRow.controller as? ScrollStackRowAnimatable) ?? (targetRow.contentView as? ScrollStackRowAnimatable)
120120
}
121121

122122
// MARK: - Initialization

0 commit comments

Comments
 (0)