我想在我的模型中有数组或集合,这是否可以使用waterline(mongoDB)?周围有什么替代品吗?
例:
{
name: Bundle,
col1 : {
name : anOtherModel,
subCol: {
text: aString,
...
}
},
col2 : {
name : anOtherModel,
subCol: {
text: aString,
...
}
}
}
Run Code Online (Sandbox Code Playgroud)
至:
module.exports = {
attributes : {
name : {
type : 'STRING',
required : true
},
basicModules: {
type : 'ARRAY', // or 'COLLECTION'
required : false
}
}
};
Run Code Online (Sandbox Code Playgroud) 子类化时是否可以重写UIScrollView的setContentOffset方法?这个AppStore是否保存?
样品:
-(void)setContentOffset:(CGPoint)contentOffset {
[super setContentOffset:contentOffset];
NSLog(@"co: %@",NSStringFromCGPoint(contentOffset));
if(_willScroll)
[_svDelegate setContentOffset:CGPointMake(contentOffset.x, contentOffset.y *2)];
}
Run Code Online (Sandbox Code Playgroud)
谢谢,
奥米德