diff --git a/experiments/swift-programmatic-modal/RNILayout/RNILayout.swift b/experiments/swift-programmatic-modal/RNILayout/RNILayout.swift index bfe70825..1b6d8bdd 100644 --- a/experiments/swift-programmatic-modal/RNILayout/RNILayout.swift +++ b/experiments/swift-programmatic-modal/RNILayout/RNILayout.swift @@ -103,12 +103,6 @@ public struct RNILayout { preferredSizeKey: \.height ); - print( - "computeRawRectSize" - + "\n - computedWidth: \(computedWidth)" - + "\n - computedHeight: \(computedHeight)" - ); - return CGSize( width : computedWidth ?? 0, height: computedHeight ?? 0 @@ -213,18 +207,7 @@ public struct RNILayout { let computedMargiVertical = (computedMarginTop ?? 0) + (computedMarginBottom ?? 0); - - print( - "computeRect" - + "\n - computedMarginLeft: \(computedMarginLeft)" - + "\n - computedMarginRight: \(computedMarginRight)" - + "\n - computedMarginTop: \(computedMarginTop)" - + "\n - computedMarginBottom: \(computedMarginBottom)" - + "\n - computedMarginHorizontal: \(computedMarginHorizontal)" - + "\n - computedMargiVertical: \(computedMargiVertical)" - ); - - + // Margin - X-Axis switch self.horizontalAlignment { case .left: diff --git a/experiments/swift-programmatic-modal/RNILayout/RNILayoutValue.swift b/experiments/swift-programmatic-modal/RNILayout/RNILayoutValue.swift index 7ed4db5b..c0e0c426 100644 --- a/experiments/swift-programmatic-modal/RNILayout/RNILayoutValue.swift +++ b/experiments/swift-programmatic-modal/RNILayout/RNILayoutValue.swift @@ -113,12 +113,6 @@ public struct RNILayoutValue { toValue: computedValueRaw ?? 0 ); - print( - "RNILayoutValue.computeValue" - + "\n - computedValueRaw: \(computedValueRaw)" - + "\n - computedValueWithOffsets: \(computedValueWithOffsets)" - ); - return self.clampValue( usingLayoutValueContext: context, forValue: computedValueWithOffsets ?? 0 diff --git a/experiments/swift-programmatic-modal/Test/RNILayoutTestViewController.swift b/experiments/swift-programmatic-modal/Test/RNILayoutTestViewController.swift index 5d5c46a4..af1ec03e 100644 --- a/experiments/swift-programmatic-modal/Test/RNILayoutTestViewController.swift +++ b/experiments/swift-programmatic-modal/Test/RNILayoutTestViewController.swift @@ -31,7 +31,9 @@ class RNILayoutTestViewController : UIViewController { ), height: RNILayoutValue( mode: .constant(100) - ) + ), + marginLeft: .safeAreaInsets(insetKey: \.left), + marginTop: .safeAreaInsets(insetKey: \.top) ), // 1 B RNILayout( @@ -42,7 +44,9 @@ class RNILayoutTestViewController : UIViewController { ), height: RNILayoutValue( mode: .constant(100) - ) + ), + marginRight: .safeAreaInsets(insetKey: \.right), + marginTop: .safeAreaInsets(insetKey: \.top) ), // 2 C RNILayout( @@ -381,11 +385,6 @@ class RNILayoutTestViewController : UIViewController { usingLayoutValueContext: layoutValueContext ); - print( - "updateFloatingView" - + "\n - computedRect: \(computedRect)" - ); - let floatingView = self.floatingView; floatingView.frame = computedRect;