Skip to content

Commit 6775c51

Browse files
authored
Implement setting an optional value as the UILabel's text (#8)
* Implement setting an optional value as the UILabel's text * Implement setting an optional value as the UITextField's placeholder * Update `CHANGELOG.md`
1 parent d6db993 commit 6775c51

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Change Log
22
All notable changes to this project will be documented in this file.
33

4+
## [Unreleased]
5+
6+
#### Added
7+
- Implement setting an optional value as the UILabel's text.
8+
- Added in Pull Request [#8](https://github.com/space-code/flex-ui/pull/8).
9+
410
#### 1.x Releases
511
- `1.2.x` Releases - [1.2.0](#120)
612
- `1.1.x` Releases - [1.1.0](#110)

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)