iOS Core Data practice and view by code