What does @NSManaged do?

后端 未结 3 1151
心在旅途
心在旅途 2021-01-30 06:55

I have encountered this keyword in various occasions. I kind of know what it\'s suppose to do. But I really want a better understanding of it.

What I noticed about

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-30 07:29

    Above mentioned answers are right. Here is my understanding.

    @NSManaged indicates that the variables will get some values when we run the app. Coredata automatically creates getter and setter for such props. It silences the compiler for warnings.

    NSmanaged is subclass of NSObject. @NSManaged means extra code will be given to these props at runtime. It tracks the changes made to those properties.

提交回复
热议问题