Custom setter methods in Core-Data

前端 未结 5 1104
夕颜
夕颜 2020-12-07 18:09

I need to write a custom setter method for a field (we\'ll call it foo) in my subclass of NSManagedObject. foo is defined in the data

5条回答
  •  独厮守ぢ
    2020-12-07 18:54

    I think there is a slight mistake: use

     [self setPrimitiveValue:inFoo forKey:@"foo"];
    

    instead of

     [self setPrimitiveFoo:inFoo];
    

    this works for me.

提交回复
热议问题