Swift 3: Set Finder label color

前端 未结 4 1958
夕颜
夕颜 2020-12-09 00:52

I\'m trying to set the colored labels shown by the finder. The only function I know is setResourceValue. But this needs localized names!

I could image my mother lang

4条回答
  •  無奈伤痛
    2020-12-09 01:17

    NSWorkspace has functions that return all label names and colors:

    https://developer.apple.com/documentation/appkit/nsworkspace/1527553-filelabelcolors

    https://developer.apple.com/documentation/appkit/nsworkspace/1533953-filelabels

提交回复
热议问题