Modifying a Custom Managed Object Class?

Discussion in 'iOS Programming' started by zerocustom1989, Jun 20, 2010.

  1. zerocustom1989 macrumors regular

    Sep 5, 2007
    Hey guys, im just breaking into Core Data and as an example I have an 'Employee' Entity that I have created a .h and .m file for using Xcodes automatically tool.

    For ex,

    I want to make one of the attributes of this Entity dependent on two other attributes. Like fullName is a combination of lastName and firstName.

    How do I edit the .h and .m files to do this? Do I add a getFullName method and have it return the combined string? I'd rather just have the fullName attribute construct itself so I can just retrieve it as needed.
  2. rossipoo macrumors regular

    Jun 7, 2009
    What part of this are you having trouble with? You will only need to add a trivial method that combines the two strings to your implementation file, and a declaration to the interface file. You may also have to add an element to the object model file. Is this from a tutorial?

Share This Page