<!--
{
  "availability" : [
    "macOS: 10.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/NSObject-swift.class/setDefaultPlaceholder(_:for:with:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Objective-C Runtime",
      "ObjectiveC"
    ],
    "preciseIdentifier" : "c:objc(cs)NSObject(cm)setDefaultPlaceholder:forMarker:withBinding:"
  },
  "title" : "setDefaultPlaceholder(_:for:with:)"
}
-->

# setDefaultPlaceholder(_:for:with:)

Sets `placeholder` as the default placeholder for the `binding`, when a key value coding compliant property of an instance of the receiving class returns the value specified by `marker`, and no other placeholder has been specified.

```
class func setDefaultPlaceholder(_ placeholder: Any?, for marker: Any?, with binding: NSBindingName)
```

## Discussion

The `marker` can be `nil` or one of the constants described in <doc://com.apple.documentation/documentation/AppKit/selection-markers>.

## See Also

  [Cocoa Bindings Programming Topics](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaBindings/CocoaBindings.html#//apple_ref/doc/uid/10000167i)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)