I know how to make global variables in the iphone programing. I want to know can we make a global function in iphone application (like a global veriables).
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.
There are many ways to do so, global functions are not a good idea when programming in Objective C , you should read later the basic ideas of MVC
Nevertheless, there is a good and easy way to achieve what you are trying to do, without doing a major programming sin.
in your ApplicationDelegate file declare your function
for example:
from another viewController / Class or such do this: