0

I have an iPhone app using a UINavigationController. On the fourth controller of the stack, I'm doing some Core Location stuff - so, the first couples of times that the user uses my app, they are asked if it's ok to use Location Services. This is a process that (I think) I don't have any control over.

After the user confirms, they are actually bumped back to my root view controller in the navigation controller stack. Is this a bug, am I doing something wrong, or is this expected behavior? I want the user to be able to continue on the fourth controller instead of having to re-navigate back to it.

If it's expected behaivor, I suppose I could kick in the location services as soon as the user starts the app, instead of in my fourth View Controller.

gerry3
  • 21,420
  • 9
  • 66
  • 74
bpapa
  • 21,409
  • 25
  • 99
  • 147

3 Answers3

2

That should not be happening i dont think, post some code, maybe you are d oing something wrong..

Daniel
  • 22,363
  • 9
  • 64
  • 71
2

If you end up removing too many views, you sometimes end up in your rootViewController or the main window.

mahboudz
  • 39,196
  • 16
  • 97
  • 124
1

The problem is that I was putting all of my app initialization code in the applicationDidBecomeActive: message. After the user decides to allow location services to be used, an UIApplicationDidBecomeActiveNotification message is sent which causes the applicationDidBecomeActive message to be called.

bpapa
  • 21,409
  • 25
  • 99
  • 147