typedef作为Core数据类型 [英] typedef as a Core data type

查看:119
本文介绍了typedef作为Core数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个核心数据模型,我的一个类需要一个变量,最好实现为typedef。现在我实现它作为一个字符串变量,它接受三个可能的值,但是当然这是不健壮的。



有一种方法来实现这个在Core Data模型?

解决方案

您可以有未定义类型的整数属性和transcient属性,根据整数属性值初始化


I am building a Core Data model and one of my classes needs to have a variable that can best be implemented as a typedef. Right now I am implementing it as a string variable that takes three possible values, but of course this is not robust.

Is there a way to implement this in the Core Data model?

解决方案

You can have integer attribute and transcient attribute of undefinied type which is initialized depending on the integer attribute value?

这篇关于typedef作为Core数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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