Skip to content

Commit 93433c3

Browse files
committed
Add feature getGap
1 parent ae3852c commit 93433c3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sources/Swift/FlexLayout.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,18 @@ public final class Flex {
12171217
// MARK: Gap
12181218
//
12191219

1220+
/**
1221+
Get paddings between views.
1222+
*/
1223+
@discardableResult
1224+
public func getGap(_ gutter: Gutter) -> CGFloat {
1225+
switch gutter {
1226+
case .column: return yoga.columnGap
1227+
case .row: return yoga.rowGap
1228+
case .all: return yoga.gap
1229+
}
1230+
}
1231+
12201232
/**
12211233
Set paddings between views.
12221234
*/

0 commit comments

Comments
 (0)