Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cocoa 将咆哮嵌入可可应用程序Iconda_Cocoa_Growl - Fatal编程技术网

Cocoa 将咆哮嵌入可可应用程序Iconda

Cocoa 将咆哮嵌入可可应用程序Iconda,cocoa,growl,Cocoa,Growl,我成功地在我的应用程序中实现了咆哮。我还有一个小问题 是否可以在通知中设置图标的大小(代码中的iconData)?它太小了 我的代码是: NSBundle *myBundle = [NSBundle bundleForClass:[AppController class]]; NSString *growlPath = [[myBundle privateFrameworksPath] stringByAppendingPathComponent:@"Growl.framework"]

我成功地在我的应用程序中实现了咆哮。我还有一个小问题

是否可以在通知中设置图标的大小(代码中的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]];
    }

如果图像本身不是太小(我不这么认为),则由活动的咆哮主题决定图像在通知中的大小。没有办法从代码中改变这一点:由用户决定要使用哪个咆哮主题