I can use a string literal like @"content", but I think it’s a waste of memory. Is there a custom solution for this situation?
I’m a new Xcoder, so may be this is not a good question, but I’m very confuse about the use of NSString…
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.
Put the text in a file. Let’s say you name the file
userAgreement.txt. Make sure the file is part of your target (check the Target Membership section of the File Inspector while you have the file open in the primary editor).Read the contents of the file at runtime like this:
A feature of this approach is that you can localize the file, and this code will automatically pick up the appropriate version for the user’s locale.
Note that if you want to use a custom end-user license agreement (EULA), and you want to put this app in the App Store, you must enter the EULA in your app configuration in iTunes Connect.