I’m extremely new to ios.
I’m trying to learn appDelegate method to pass data in my application. When I’m setting the value for the variable (appDelegate variable) it does set it @ that point of time
but after 2 steps it shows it as out of scope.
While retrieving it when I do this
myAppDelegate *appDelegate = (myAppDelegate *)[[UIApplication sharedApplication] delegate];
myClass *my = [appDelegate.myclass objectAtIndex:0];
It say to a few of my property of myClass.(checked using a breakpoint & the ramdom like sometimes it first and second next time it is the third one).
Does anyone know what I’m missing ???
Thank you for your help ! 🙂
You can’t always trust the debugger to show you variable content well. If the debugger says it’s not in scope, try to print out the variable content to the console with:
Only if this crashes/fails, you have an actual problem.