Domanda

How to create a NSButton with non-square "hit area"?

Example:

enter image description here

Thanks.

È stato utile?

Soluzione

You could probably subclass NSButton and override hitTest: to return nil when outside the area you want to be clickable. (Return [super hitTest:] when inside.)

Docs here.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top