Mountain Lionの新機能の一つ、通知センターをうまく使えないかと試してみた記録。今まではgrowlnotifyコマンドを利用して、AppleScriptなどの処理の状態を知る手がかりにしていた。できることならOSX標準の仕組みだけで通知したいのだ。 Objective-C CocoaはObjective-Cで書かれている。Objective-CはCocoaのために存在する、と言えるかもしれない。 だから、最初はObjective-Cで考えることが、理解への近道だと考えた。 #import "AppDelegate.h" @implementation AppDelegate - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { // Insert code here to initializ
![通知センターでHello, world! - ザリガニが見ていた...。](https://cdn-ak-scissors.b.st-hatena.com/image/square/f58994fbb48cad438865c9af4839974f11c4d0bc/height=288;version=1;width=512/https%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fz%2Fzariganitosh%2F20120913%2F20120913082449.png)