Why do you need to use import statements in the .h and .m files
What is the difference between @class Possession and #import Possession.h
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 don’t necessarily need to duplicate import statements in both the
.hand.mfiles. If you#importa file in a.hfile, and then import that.hfile in your.mfile, then anything imported in the.hwill be available in the.mfile.@classdeclares a class, but it doesn’t define it; it’s just a say to say, “A class calledPossessionexists somewhere in the project.” It’s used if you only need to declare a type, but you don’t need to access any variables or methods in the class.A
#importstatement just imports a header file.