Skip to content

Commit 4f4862b

Browse files
committed
Fixed wrong layout for vertical bottom distribution
1 parent c3eecd7 commit 4f4862b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

FrameLayoutKit.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'FrameLayoutKit'
3-
s.version = '5.2.5'
3+
s.version = '5.2.6'
44
s.summary = 'FrameLayoutKit is a super fast and easy to use layout kit'
55
s.description = <<-DESC
66
An auto layout kit helps you to layout your UI easier, faster and more effective

FrameLayoutKit/Classes/StackFrameLayout.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ open class StackFrameLayout: FrameLayout {
995995

996996
gapSpace = 0
997997
var ratioIndex = 0
998-
var offset = containerFrame.height + edgeInsets.top
998+
var offset = containerFrame.maxY
999999
for frameLayout in invertedLayoutArray {
10001000
var rect = frameLayout.frame
10011001
let isEmpty = frameLayout.isEmpty
@@ -1009,15 +1009,15 @@ open class StackFrameLayout: FrameLayout {
10091009
ratioIndex += 1
10101010
}
10111011

1012+
if isEmpty { continue }
1013+
10121014
offset -= rect.height + gapSpace
10131015

10141016
if rect.minY != offset || frameLayout.frame.size != rect.size {
10151017
rect.origin.y = offset
10161018
frameLayout.frame = rect
10171019
}
10181020

1019-
if isEmpty { continue }
1020-
10211021
gapSpace = rect.height > 0 ? spacing : 0
10221022
}
10231023
}

0 commit comments

Comments
 (0)