Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
非正方形の「ヒットエリア」でNSButtonを作成するにはどうすればよいですか?
例:
ありがとう。
おそらくNSButtonをサブクラス化hitTest:し、クリック可能にしたい領域の外側にあるときにnilを返すようにオーバーライドすることができます。(中に入ると戻り[super hitTest:]ます。)
hitTest:
[super hitTest:]
ここにドキュメント。