---
title: becomeMain()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nswindow/becomemain()
---

# becomeMain()

Informs the window that it has become the main window.

## Declaration

```swift
func becomeMain()
```

## Discussion

Discussion This method posts an didBecomeMainNotification to the default notification center. Never invoke this method directly.

## See Also

### Related Documentation

- [becomeKey()](appkit/nswindow/becomekey().md)

### Managing Main Status

- [isMainWindow](appkit/nswindow/ismainwindow.md)
- [canBecomeMain](appkit/nswindow/canbecomemain.md)
- [makeMain()](appkit/nswindow/makemain().md)
- [resignMain()](appkit/nswindow/resignmain().md)
