我想通过Editor \ Create NSManagedObject Subclass ... menu为我的实体添加一个类。但是当我添加它时,项目出错了,这是消息:
<script>
$(document).ready(function() {
var found = false;
$('.bd a').each(function(index, ele){
if($(ele).html().indexOf('Charity Bucks') > -1){
found = true;
var parent = $(ele).parent().parent();
var sibs = $(parent).siblings('.group4');
$(sibs).find('a').each(function(index2, ele2){
console.log(ele2);
if($(ele2).html().indexOf('remove') > -1){
console.log('found it');
$(ele2).on('click', function(){
$('#divID').show();
});
}
});
}
})
if(found){
$('#divID').hide();
}
});
</script>
我在File-> Project settings中将该生成系统更改为Legacy Build system。但这还行不通
这个使用xcode9制作的项目,我现在用xcode 10进行开发
答案 0 :(得分:17)
在项目导航器中选择xcdatamodeld
文件,选择实体,然后按⌥⌘3(数据模型检查器)。
如果您手动创建了类,则必须将Codegen
弹出窗口设置为Manual/None
,否则将隐式创建类文件。
答案 1 :(得分:0)