开发者

How To Setup Core Data Model For Simple App?

I'm familiar with core data but want to make a simple app that calculates salary. User enters their expenses, etc and it will determine how much their income needs to be to make it work.

I'm thinking I make an entity for each Event and then have an attribute expens开发者_开发问答e for each expense.

Is there then an easy way to add all these values of expense properties and do some calculations with them? I will set their type to float or nsnumber or int, etc.

Update: I will make the relationship of Event to Expense to many and the inverse relation ship would be one to one. But about actually doing calculations with these values?


If you are going to add many values to Entity, you must use a relationship between them, it's the only way to have and Event with its Expenses...

Event <---->> Expense

An Event has too many Expenses and every Expense belongs to an Event...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜