Skip to content

Commit

Permalink
FIX: layer layout animation at start (Juanpe#549)
Browse files Browse the repository at this point in the history
  • Loading branch information
nazadigio committed Feb 22, 2024
1 parent 5699404 commit 9fd63ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ private extension UIView {
}) { subview in
subview.recursiveShowSkeleton(skeletonConfig: config)
}

layoutSkeletonIfNeeded()

if let root = root {
_flowDelegate?.didShowSkeletons(rootView: root)
}
Expand All @@ -126,7 +127,8 @@ private extension UIView {
}) { subview in
subview.recursiveUpdateSkeleton(skeletonConfig: config)
}

layoutSkeletonIfNeeded()

if let root = root {
_flowDelegate?.didUpdateSkeletons(rootView: root)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import UIKit
extension UIView {

func startTransition(transitionBlock: @escaping () -> Void) {
layoutIfNeeded()

guard let transitionStyle = _currentSkeletonConfig?.transition,
transitionStyle != .none else {
transitionBlock()
Expand Down

0 comments on commit 9fd63ec

Please sign in to comment.