@craft-native/ios 0.0.299 → 0.0.301

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@craft-native/ios",
3
- "version": "0.0.299",
3
+ "version": "0.0.301",
4
4
  "homepage": "https://github.com/craft-native/craft/tree/main/packages/ios#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8077,15 +8077,17 @@ final class CraftNativeScreenController: UIViewController, UIScrollViewDelegate,
8077
8077
  break
8078
8078
  }
8079
8079
  let field = result as! UITextField
8080
- field.placeholder = props["placeholder"] as? String
8081
- if let placeholder = field.placeholder,
8080
+ if let placeholder = props["placeholder"] as? String,
8082
8081
  let placeholderColor = color(props["placeholderTextColor"]) {
8083
8082
  field.attributedPlaceholder = NSAttributedString(
8084
8083
  string: placeholder,
8085
8084
  attributes: [.foregroundColor: placeholderColor]
8086
8085
  )
8087
8086
  } else {
8087
+ // UIKit shares these properties: resetting the attributed
8088
+ // value after the plain one also erases the visible hint.
8088
8089
  field.attributedPlaceholder = nil
8090
+ field.placeholder = props["placeholder"] as? String
8089
8091
  }
8090
8092
  field.tintColor = color(props["selectionColor"])
8091
8093
  let fieldId = ObjectIdentifier(field)