본문 바로가기

개발관련/Mac

customizing alert dialog - using NSAlert

 NSRunAlert 를 좀더 custom 하게 하는 것을 찾다가..

 NSAlert 를 이용해서 alert 를 사용 할 수 있다.

 addButtonWithTitle, setMessgeText 등을 이용해서 직접 설정해줘야 하고.

 setAccessoryView 에 사용할 뷰를 생성해 주면 된다.

 애초 의도는 메세지 및 버튼 아이콘의 재 정렬이었는데 생각처럼 간단히는 안되는 것 같다.

 게다가 setIcon 할 경우 기존의 icon 위치에 re-sizing 되서 들어가 버린다.. 젠장맞을..

 어쨋든 이래저래 꼼수의 여지는 있는;

[ customizing alert dialog ]

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Dialog/Articles/CustomAlertDialogs.html#//apple_ref/doc/uid/TP40008110-SW1 

[ NSAlert class reference ]

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSAlert_Class/Reference/Reference.html