I am new to iPhone development. I want to access a string variable in all the class methods, and I want to access that string globally. How can I do this?
Please help me out.
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 can achieve that by implementing getter and setters in the delegate class.
In delegate .h file
Include UIApplication delegate
In Delegate implementation class .m
So the variable you to assess is set in the currentlink string by setters method and class where you want the string ,just use the getter method.
All the best