gpt4 book ai didi

iphone - CIFilter filterWithName :keysAndValues: set keysAndValues from NSDictionary

转载 作者:行者123 更新时间:2023-11-28 22:52:14 26 4
gpt4 key购买 nike

嗨,我正在尝试做这样的事情:

NSMutableDictionary *param1 = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"inputIntensity", [NSNumber numberWithFloat:0.8], nil];
[param1 setObject:file forKey:kCIInputImageKey];
CIFilter *filter = [CIFilter filterWithName:@"CISepiaTone" keysAndValues:param1];

显然它不起作用,那么,如何从一个已经存在的字典中填充 keysAndValues 呢?谢谢!

最佳答案

你应该使用最简单的构造方法(filterWithName:)并用[filter setValue:value forKey:key] 遍历现有字典的键来填充值。它只需要几行代码。

关于iphone - CIFilter filterWithName :keysAndValues: set keysAndValues from NSDictionary,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11666291/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com