forum

Home / DeveloperSection / Forums / In Objective-C proper use of Application delegate

In Objective-C proper use of Application delegate

Anonymous User 1248 13-Dec-2015

I want to call a web-service to get the users information, and after I want to be able to access this information from anywhere in our application using like this:

MyDelegate *delegate = [[UIApplication sharedApplication] delegate];
user = delegate.u;

Is setting an instance variable as a User object in the app delegate and referencing it from there when needed a poor way of going about it? I typically set it there upon the user's login.


Updated on 14-Dec-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By