環境:Xcode8.0, swift3
下列圖片按步驟
1.png
點擊下方addEntity
Paste_Image.png
ENTITIES就是創建的表
Paste_Image.png
Paste_Image.png
Attribute里邊的?號創建attribute
Paste_Image.png
然后點擊上邊欄,Editor點擊Create NSManagedObject subclass
Paste_Image.png
Paste_Image.png
Paste_Image.png
Paste_Image.png
添加頭文件
Paste_Image.png
添加數據庫映射
Paste_Image.png