Skip to content

Commit 68ae6c5

Browse files
authored
Merge pull request #25 from scarayaa/feature/fix-constraints-ios-17
Fix constraints ios 17
2 parents 0d8e744 + a16b2cc commit 68ae6c5

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

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() {

0 commit comments

Comments
 (0)