Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/121.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
Ios 当返回值的类型为CGFloat时,如何使用ReactiveCocoa发送KeyPath_Ios_Reactive Cocoa_Reactive Cocoa 3 - Fatal编程技术网

Ios 当返回值的类型为CGFloat时,如何使用ReactiveCocoa发送KeyPath

Ios 当返回值的类型为CGFloat时,如何使用ReactiveCocoa发送KeyPath,ios,reactive-cocoa,reactive-cocoa-3,Ios,Reactive Cocoa,Reactive Cocoa 3,错误日志为: self.subscription = [[[RACObserve(photoModel, fullsizedData) filter:^BOOL(id value) { return value != nil; }]map:^id(id value) { return [NSNumber numberWithFloat:1.0f]; } ]setKeyPath:@keypath(self.image

错误日志为:

       self.subscription = [[[RACObserve(photoModel, fullsizedData) filter:^BOOL(id value) {
                return value != nil;
          }]map:^id(id value) {
    return [NSNumber numberWithFloat:1.0f];
    } ]setKeyPath:@keypath(self.imageView.layer,borderWidth)onObject:self.imageView];
由于未捕获异常“NSUnknownKeyException”而终止应用程序,
原因:'[setValue:forUndefinedKey:]:
此类不符合密钥半径的密钥值编码。

我认为如果有另一种方法来反应值的类型是float、int等等。我会接受它。你应该使用string而不是
@keypath

   Terminating app due to uncaught exception 'NSUnknownKeyException',
   reason: '[<UIImageView 0x7b1a8510> setValue:forUndefinedKey:]:
   this class is not key value coding-compliant for the key cornerRadius.
或者可以使用更清晰的RAC宏

    [... setKeyPath:"layer.borderWidth" onObject:self.imageView];

您应该使用字符串而不是
@keypath

   Terminating app due to uncaught exception 'NSUnknownKeyException',
   reason: '[<UIImageView 0x7b1a8510> setValue:forUndefinedKey:]:
   this class is not key value coding-compliant for the key cornerRadius.
或者可以使用更清晰的RAC宏

    [... setKeyPath:"layer.borderWidth" onObject:self.imageView];

您应该使用字符串而不是
@keypath

   Terminating app due to uncaught exception 'NSUnknownKeyException',
   reason: '[<UIImageView 0x7b1a8510> setValue:forUndefinedKey:]:
   this class is not key value coding-compliant for the key cornerRadius.
或者可以使用更清晰的RAC宏

    [... setKeyPath:"layer.borderWidth" onObject:self.imageView];

您应该使用字符串而不是
@keypath

   Terminating app due to uncaught exception 'NSUnknownKeyException',
   reason: '[<UIImageView 0x7b1a8510> setValue:forUndefinedKey:]:
   this class is not key value coding-compliant for the key cornerRadius.
或者可以使用更清晰的RAC宏

    [... setKeyPath:"layer.borderWidth" onObject:self.imageView];

它不应该是@keypath(self.imageView,layer.borderWidth)?它不应该是@keypath(self.imageView,layer.borderWidth)?它不应该是@keypath(self.imageView,layer.borderWidth)?你也可以使用信号操作符去掉所有的块:
[[RACObserve](photoModel,fullsizedData]ignore:nil]maprelace:@1.0f]
您还可以使用信号操作符除去所有块:
[[RACObserve(photoModel,fullsizedData]ignore:nil]maprelace:@1.0f]
您还可以使用信号操作符除去所有块:
[[RACObserve(photoModel,fullsizedData]ignore:nil]mapReplace:@1.0f]
您还可以使用信号操作符清除所有块:
[[RACObserve(photoModel,fullsizedData]ignore:nil]mapReplace:@1.0f]