Skip to content

Commit a2c34f7

Browse files
authored
Release 1.3.0 (#11)
Release `1.3.0`
2 parents 6c46fb8 + 1221f23 commit a2c34f7

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@
22
All notable changes to this project will be documented in this file.
33

44
#### 1.x Releases
5+
- `1.3.x` Releases - [1.3.0](#130)
56
- `1.2.x` Releases - [1.2.0](#120)
67
- `1.1.x` Releases - [1.1.0](#110)
78
- `1.0.x` Releases - [1.0.0](#100)
89

10+
## [1.3.0](https://github.com/space-code/flex-ui/releases/tag/1.3.0)
11+
Released on 2025-05-08.
12+
13+
#### Added
14+
- Implement a new `setImage` method for the `UIButton` class.
15+
- Added in Pull Request [#9](https://github.com/space-code/flex-ui/pull/9).
16+
- Implement setting an optional value as the UILabel's text.
17+
- Added in Pull Request [#8](https://github.com/space-code/flex-ui/pull/8).
18+
919
## [1.2.0](https://github.com/space-code/flex-ui/releases/tag/1.2.0)
1020
Released on 2025-02-15.
1121

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,17 @@ public extension FlexUI where Component: UIButton {
205205
component.isEnabled = isEnable
206206
return self
207207
}
208+
209+
/// Sets the image for a specific button state.
210+
///
211+
/// - Parameters:
212+
/// - image: The image to set.
213+
/// - controlState: The state for which to set the background image (default is `.normal`).
214+
/// - Returns: The current instance of `FlexUI` for further configuration.
215+
@discardableResult
216+
@MainActor
217+
func setImage(_ image: UIImage, for controlState: UIControl.State = .normal) -> Self {
218+
component.setImage(image, for: controlState)
219+
return self
220+
}
208221
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// flex-ui
3-
// Copyright © 2024 Space Code. All rights reserved.
3+
// Copyright © 2025 Space Code. All rights reserved.
44
//
55

66
import UIKit
@@ -12,7 +12,7 @@ public extension FlexUI where Component: UILabel {
1212
/// - Returns: The current instance of `FlexUI` for further configuration.
1313
@discardableResult
1414
@MainActor
15-
func text(_ text: String) -> Self {
15+
func text(_ text: String?) -> Self {
1616
component.text = text
1717
return self
1818
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public extension FlexUI where Component: UITextField {
2323
/// - Returns: The current instance of `FlexUI` for further configuration.
2424
@discardableResult
2525
@MainActor
26-
func placeholder(_ placeholder: String) -> Self {
26+
func placeholder(_ placeholder: String?) -> Self {
2727
component.placeholder = placeholder
2828
return self
2929
}

0 commit comments

Comments
 (0)