diff --git a/Example/FrameLayoutKit.xcworkspace/xcuserdata/namkennic.xcuserdatad/UserInterfaceState.xcuserstate b/Example/FrameLayoutKit.xcworkspace/xcuserdata/namkennic.xcuserdatad/UserInterfaceState.xcuserstate index ec0f412..8dfb1bd 100644 Binary files a/Example/FrameLayoutKit.xcworkspace/xcuserdata/namkennic.xcuserdatad/UserInterfaceState.xcuserstate and b/Example/FrameLayoutKit.xcworkspace/xcuserdata/namkennic.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/FrameLayoutKit.podspec b/FrameLayoutKit.podspec index de54699..daa9779 100644 --- a/FrameLayoutKit.podspec +++ b/FrameLayoutKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'FrameLayoutKit' - s.version = '7.0.3' + s.version = '7.0.4' s.summary = 'FrameLayoutKit is a super fast and easy to use layout kit' s.description = <<-DESC FrameLayoutKit is a powerful Swift library designed to streamline the process of creating user interfaces. With its intuitive operator syntax and support for nested functions, developers can effortlessly construct complex UI layouts with minimal code. By leveraging the flexibility of operators, developers can easily position and arrange views within a container view, enabling precise control over the visual hierarchy. Additionally, the library offers a range of convenient functions for configuring view properties, such as setting dimensions, margins, and alignment. Whether you're building a simple screen or a complex interface, FrameLayoutKit simplifies the UI creation process, resulting in cleaner, more maintainable code. diff --git a/FrameLayoutKit/Classes/DoubleFrameLayout.swift b/FrameLayoutKit/Classes/DoubleFrameLayout.swift index ebe35fa..4f3d844 100644 --- a/FrameLayoutKit/Classes/DoubleFrameLayout.swift +++ b/FrameLayoutKit/Classes/DoubleFrameLayout.swift @@ -902,6 +902,9 @@ open class DoubleFrameLayout: FrameLayout { } } + targetFrame1 = targetFrame1.offsetBy(dx: translationOffset.x, dy: translationOffset.y) + targetFrame2 = targetFrame2.offsetBy(dx: translationOffset.x, dy: translationOffset.y) + frameLayout1.frame = targetFrame1.integral frameLayout2.frame = targetFrame2.integral } diff --git a/FrameLayoutKit/Classes/StackFrameLayout.swift b/FrameLayoutKit/Classes/StackFrameLayout.swift index 9a47b7e..dc51789 100644 --- a/FrameLayoutKit/Classes/StackFrameLayout.swift +++ b/FrameLayoutKit/Classes/StackFrameLayout.swift @@ -1201,6 +1201,12 @@ open class StackFrameLayout: FrameLayout { break } } + + if translationX != 0 || translationY != 0 { + frameLayouts.forEach { + $0.frame = $0.frame.offsetBy(dx: translationOffset.x, dy: translationOffset.y) + } + } } }