Coredata编号返回PFCachedNumber类的编号 [英] Coredata number returns a number of PFCachedNumber class

查看:58
本文介绍了Coredata编号返回PFCachedNumber类的编号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

就像标题说的那样,我有一对多的关系,许多人接受数字,并且给了它一个NSNumber,但是当我从coredata取回该数字时,它以PFCachedNumber的形式出现。

Like the title says i have a one to many relationship and the many accepts numbers, and it is given an NSNumber, however when i retrieve that number back from coredata it comes in the form of a PFCachedNumber. Any thoughts on why this may be?

谢谢!

for (UserNumber *info in pinNumberArray) {

//The numbers I'm after are inside ergTimes.
        NSSet *time = [[NSSet alloc] initWithSet:info.Times];

        for (ErgTimes *ergTimes in time){
            NSLog(@"Times Class : %@", [ergTimes.Twok class]);
        }
    }     


推荐答案

I不用担心。这是常见的情况。

I wouldn't worry about it. This is a common occurrence.

NSNumber与大多数常见的API类一样,实际上是一个类集群,其中大量类伪装成一个类。例如,如果将NSString初始化为文件路径,则实际上会得到一个专门用于处理文件路径的类。

NSNumber, like most common API classes, is actually a "class cluster" in which a large number of classes masquerade as a single class. For example, if you initialize an NSString as a file path, you actually get back a class dedicated to handling file paths.

我没见过这个特殊的课程,但我认为 PF 代表 PrivateFramework,就像 NS 代表 NextStep,而 CF 代表 CoreFoundation。这可能是我们不应该轻易看到的内部课程。

I haven't seen this particular class but I presume that PF stands for "PrivateFramework" just like NS stands for "NextStep" and CF stands for "CoreFoundation". It's likely an internal class we're not supposed to see easily.

(我很高兴他们拼写错误地缓存了。)

(I am amused that they spelled "cached" incorrectly.)

您使用像这样的类测试:

You test for a class cluster with a class test like so:

[pfCashedNumerObject class] == NSNumber

类集群内部类都标识为同一公共类。

Class-clusters internal classes all identify as the same public class.

这篇关于Coredata编号返回PFCachedNumber类的编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆