How to define preprocessor macros in build settings, like IPAD_BUILD, and IPHONE_BUILD (and how to use them in my factory methods)?
I’m using these by heart now, would be cool to know what is going behind.
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.
/#if works as usual if:
/#ifdef means “if defined – some value or macros”:
or:
Use this link for more information
http://www.techotopia.com/index.php/Using_Objective-C_Preprocessor_Directives
To test whether you running iPad or not you should have smth like this:
Here’s another useful preprocessor functions: