It is possible in Xcode to set empty string as default value of NSString type attribute? Or [NSDate date] as default value of NSDate type attribute?
It is possible in Xcode to set empty string as default value of NSString
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will have to do both programmatically. However, you can’t let
[NSDate date]be a default value (since at the time you would set that default value you are simply using the date at the specific time that you set the default value, not when the MO gets created).You should create a subclass of
NSManagedObjectand implement theawakeFromInsertmethod: