Skip to content

Commit

Permalink
Merge branch 'main' of github.com:lightningkite/kiteui
Browse files Browse the repository at this point in the history
  • Loading branch information
WesleyEdwards committed Jul 3, 2024
2 parents 60c6160 + 3162a60 commit 88f7680
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
package com.lightningkite.kiteui.views

import com.lightningkite.kiteui.objc.UIViewWithSizeOverridesProtocol
import com.lightningkite.kiteui.views.direct.ScrollLayout
import kotlinx.cinterop.ExperimentalForeignApi
import platform.UIKit.UIView

@OptIn(ExperimentalForeignApi::class)
fun UIView.informParentOfSizeChange() {
(superview as? UIViewWithSizeOverridesProtocol)?.subviewDidChangeSizing(this)
if (superview !is ScrollLayout) {
(superview as? UIViewWithSizeOverridesProtocol)?.subviewDidChangeSizing(this)
} else {
superview?.informParentOfSizeChange()
}
setNeedsLayout()
}

0 comments on commit 88f7680

Please sign in to comment.