1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

NSPanelで、他のアプリのフォーカスを奪わない常駐パネルを作る

1
Last updated at Posted at 2026-10-20

ja-02-workstation.png

やりたいこと

画面の端に常駐し、クリックしても作業中のアプリがアクティブなままのパネル。自作アプリCaddyの設定です。

設定

styleMask: [.borderless, .nonactivatingPanel]
level = .floating
hidesOnDeactivate = false

ポイント

・.nonactivatingPanel:メニューバーも元のアプリのまま
・isFloatingPanelはlevelをリセットするので、levelは後で設定
・hidesOnDeactivate:初期値trueだと外側のクリックで消える
・位置はconstrainFrameRectを上書きして自分で決める

アプリ:https://apps.apple.com/app/id6802867430
サイト:https://caddydocs.com

おまけ

Caddy Proの無料コードを5つ(1コード1回限り、MacのApp Storeで「コードを使う」):
FR8KP6YRER8KXN7HTA
HPHKXWP3KEW8AWNRRF
H4NJRXWLTJLT3JRJKF
YFRT3HWRR4YJMWF7NK
WTP4NXFW47TE33LF8L

リンクから直接:
https://apps.apple.com/redeem?ctx=offercodes&id=6802867430&code=FR8KP6YRER8KXN7HTA
https://apps.apple.com/redeem?ctx=offercodes&id=6802867430&code=HPHKXWP3KEW8AWNRRF
https://apps.apple.com/redeem?ctx=offercodes&id=6802867430&code=H4NJRXWLTJLT3JRJKF
https://apps.apple.com/redeem?ctx=offercodes&id=6802867430&code=YFRT3HWRR4YJMWF7NK
https://apps.apple.com/redeem?ctx=offercodes&id=6802867430&code=WTP4NXFW47TE33LF8L

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?