How to change the appearance of a flag?

I would like to create a custom checkbox that works like a regular checkbox, but it looks different, at the moment I'm using a regular checkbox, is there any way to do this.

PS This is Cocoa I'm talking about.

+3
source share
2 answers

You need to override NSButtonCell. You will use drawInteriorWithFrame:inView:either a similar method to make your own drawing. If you've never used custom cells before this may be a bit of a learning experience, but there are a lot of good tips there, like this page for starters.

You can also take a look at an open source framework like BGHUDAppKit .

+6

, "" , Apple, NSButton XCode/Interface Builder . .

+4

Source: https://habr.com/ru/post/1707551/


All Articles