문제

Adding a second input source and selecting Show Input menu in menu bar:

enter image description here

Will result in the display the corresponding flag in the menu bar:

enter image description here

I'm hoping to add a flag to my menu-bar application.

Questions:

  • Is there a Unicode character for each country's flag?
  • How would I add an image to the menu bar? What are the dimensions, resolution, and supported image types?
도움이 되었습니까?

해결책

No there is not a Unicode character or emoji for each flag at this time. You can set the image of the NSStatusItem instance and change it using setImage: It's a fairly flexible class and you can do other things also for this.

One note, you should take pains to ensure yours is not confused with the input menu. That would be bad for users.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top