我在我的应用程序中成功实现了 Growl。我还有一个小问题。
可以在通知中设置图标的大小(代码中的iconData)吗?太小了..
我的代码是:
NSBundle *myBundle = [NSBundle bundleForClass:[AppController class]];
NSString *growlPath = [[myBundle privateFrameworksPath] stringByAppendingPathComponent:@"Growl.framework"];
NSBundle *growlBundle = [NSBundle bundleWithPath:growlPath];
if (growlBundle && [growlBundle load]) {
[GrowlApplicationBridge setGrowlDelegate:self];
[GrowlApplicationBridge notifyWithTitle:@"ALERT!!!" description:@"\n\nNonloso" notificationName:@"Hack" iconData:[[[NSImage alloc] initWithContentsOfFile:@"/Users/blabla/image.JPG"] TIFFRepresentation] priority:2 isSticky:NO clickContext:[NSDate date]];
}