Skip to content

Commit 855dc32

Browse files
authored
feat: add fluent tag(_:) setter (#51)
1 parent 71a4767 commit 855dc32

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Sources/FlexUI/Classes/Extensions/FlexUI+UIView.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,4 +220,15 @@ public extension FlexUI where Component: UIView {
220220
component.tintColor = tintColor
221221
return self
222222
}
223+
224+
/// Sets the tag for the view.
225+
///
226+
/// - Parameter tag: An integer value identifying the view.
227+
/// - Returns: The current instance, allowing method chaining.
228+
@discardableResult
229+
@MainActor
230+
func tag(_ tag: Int) -> Self {
231+
component.tag = tag
232+
return self
233+
}
223234
}

0 commit comments

Comments
 (0)