Application Delegation Object

In my appdelegate, I have declared a custom class object that I have developed. And in my opinion the controller added the following lines of code:

AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.dbConnector loadImages:self];

      

There are no errors, however, even though the compiler handles loadImages, it will not go into the function. I used breakpoints to check this. Any suggestions?

+3


source to share


2 answers


The property dbConnector

is probably zero. Make sure you are setting an instance of this property. You can send any message to zero so you don't get any warnings or errors. The property dbConnector

is set to nil by default until you assign it.



+1


source


[appDelegate.dbConnector loadImages:appDelegate];

      



-2


source







All Articles