How to access a property value of AppDelegate class from someView Controller without creating reference of the delegate in view controller?
How to access a property value of AppDelegate class from someView Controller without creating
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.
I’m not quite sure what you mean – there are multiple ways to get information from your application delegate into a view controller, and the phrase “without creating reference of the delegate” is unclear. Your options basically are:
@propertydeclared and@synthesized for use, then you would have the app delegate just set the property on the view controller instance.Neither of these options require that you retain a copy of your app’s delegate as a
@property, but the first does reference the delegate once.