0

我在我的应用程序中成功实现了 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]];
    }
4

1 回答 1

0

如果图像本身不是太小(我不这么认为),则由活动的 Growl 主题决定图像在通知中的大小。无法从您的代码中更改它:由用户决定他想要使用哪个 Growl 主题。

于 2012-06-21T18:08:51.543 回答