0
我做畫的iPad應用程序,它需要保存CGPoint(轉換成NSValue)的NSMutableArray中的倍數,建議我選擇coredata功能或任何其它技術途徑節省更多陣列的數量如何在CoreData中保存NSValue的NSMutableArray?
我做畫的iPad應用程序,它需要保存CGPoint(轉換成NSValue)的NSMutableArray中的倍數,建議我選擇coredata功能或任何其它技術途徑節省更多陣列的數量如何在CoreData中保存NSValue的NSMutableArray?
我找到了答案我的問題, 1. NSValue包含CGPoint值(CGPoint是C結構)首先我們必須做鑄造[NSValue valueWithCGPoint:anyCGPoint];現在我們可以將它保存到NSMutableArray中。 2.要將NSMutableArray保存到Coredata中,首先必須將其轉換爲NSSet。這將通過Coredata的一對多關係來完成。
可以請提供關於您的「2」點的更多詳細信息。我也在尋找相同的方法。 – ajay 2012-04-03 03:46:03
@ajay看看這些文章會很有用[link1](http://www.theappcodeblog.com/2011/09/29/iphone-app-development-tutorial-core-data-part-2-one -to-many-relationship /),[link2](http://stackoverflow.com/questions/5399195/where-can-i-find-a-good-example-of-a-core-data-to-many -關係) – theDebugger 2012-04-04 06:17:17