Skip to content

Commit c063646

Browse files
committed
refactor: simplify SFSymbolContainer sizing
Remove unused calculatedSize logic as sizing is now handled through SwiftUI frame modifiers in SFSymbolView
1 parent db8f828 commit c063646

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ios/components/SFSymbol/SFSymbolContainer.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ public class SFSymbolContainer: SwiftUIContainerView {
2121
let decoder = JSONDecoder()
2222
let updatedProps = try decoder.decode(SFSymbolProps.self, from: jsonData)
2323
props.merge(from: updatedProps)
24-
// Notify the layout system that our intrinsic size may have changed
25-
invalidateIntrinsicContentSize()
2624
} catch {
2725
print("Failed to update SFSymbolProps: \(error)")
2826
}
2927
}
28+
29+
// Expose intrinsic size to React Native layout using UIKit's UIImage sizing
30+
override public var intrinsicContentSize: CGSize {
31+
return props.calculatedSize
32+
}
3033
}

0 commit comments

Comments
 (0)