Skip to content

Commit

Permalink
Fixed wrong layout for vertical bottom distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
kennic committed Jan 28, 2021
1 parent c3eecd7 commit 4f4862b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion FrameLayoutKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FrameLayoutKit'
s.version = '5.2.5'
s.version = '5.2.6'
s.summary = 'FrameLayoutKit is a super fast and easy to use layout kit'
s.description = <<-DESC
An auto layout kit helps you to layout your UI easier, faster and more effective
Expand Down
6 changes: 3 additions & 3 deletions FrameLayoutKit/Classes/StackFrameLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ open class StackFrameLayout: FrameLayout {

gapSpace = 0
var ratioIndex = 0
var offset = containerFrame.height + edgeInsets.top
var offset = containerFrame.maxY
for frameLayout in invertedLayoutArray {
var rect = frameLayout.frame
let isEmpty = frameLayout.isEmpty
Expand All @@ -1009,15 +1009,15 @@ open class StackFrameLayout: FrameLayout {
ratioIndex += 1
}

if isEmpty { continue }

offset -= rect.height + gapSpace

if rect.minY != offset || frameLayout.frame.size != rect.size {
rect.origin.y = offset
frameLayout.frame = rect
}

if isEmpty { continue }

gapSpace = rect.height > 0 ? spacing : 0
}
}
Expand Down

0 comments on commit 4f4862b

Please sign in to comment.