<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/becomeMain()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)becomeMainWindow"
  },
  "title" : "becomeMain()"
}
-->

# becomeMain()

Informs the window that it has become the main window.

```
func becomeMain()
```

## Discussion

This method posts an [`didBecomeMainNotification`](/documentation/AppKit/NSWindow/didBecomeMainNotification) to the default notification center.

Never invoke this method directly.

## See Also

[`becomeKey()`](/documentation/AppKit/NSWindow/becomeKey())

Informs the window that it has become the key window.



---

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)