<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSButton/init(title:image:target:action:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSButton(cm)buttonWithTitle:image:target:action:"
  },
  "title" : "init(title:image:target:action:)"
}
-->

# init(title:image:target:action:)

Creates a standard push button with a title and image.

```
convenience init(title: String, image: NSImage, target: Any?, action: Selector?)
```

## Parameters

`title`

The localized title string to display on the button.

`image`

The image to display in the body of the button.

`target`

The target object that receives action messages from the button.

`action`

The action message the button sends to the target.

## Discussion

---

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)