Creating a fully customized NSAlert

后端 未结 3 1724
误落风尘
误落风尘 2020-12-11 04:47

Is it possible to create a fully customized alert? I\'m doing it with custom sheets now, but I\'d like to have the feature that the sheet is blocking (like -[NSAlert r

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-11 05:29

    You will need a custom window with custom view drawing, however NSAlert does not allow you to change its window. So you will need to write your own window controller subclass like NSAlert ( though NSAlert is a subclass of NSObject ).

提交回复
热议问题