Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
ViewController called before applicationDidFinishLaunching?
hopefully this is a simple one to solve, but it has me stumped, my app gives the user an option to grab certain data from the addressbook to partially complete an SQL database at app start time.
i've added a uialertview and progressview window which works quite nicely.
its a tab bar controller and the root tabs view controller is already loaded before the alertview code has had a chance to be run.
I thought that the entire applicationdidfinishlaunching method was run through before the relevant viewcontroller took over?
if not, this may be a fix.....is there a way to re-run viewdidappear/load when the alertview has been dismissed to re-run the code within it...? this would fix my problem as viewdidload just queries the SQLite database to re-populate the array I have in there.
am curious though as to why my initial view is being called before appdidfinishlaunching?
anyone had this problem before?
I just ran into this one myself and think I've figured it out. When ApplicationDidFinishLaunching does this:
[window addSubview:[self.viewController view]];
it seems to trigger the view's ViewDidLoad. My solution for the moment is just to move that line to after all my tweaks to ApplicationDidFinishLaunching. If you are doing more interesting things in ApplicationDidFinishLaunching, perhaps this not the best solution. I am just loading some plists, so it doesn't cause me any problems.
An alternative, I suppose, would be for ApplicationDidFinishLaunching to call ViewDidLoad (or some other method) just before it does the MakeKeyAndVisible call.
I have been experiencing the same issue whereby viewDidLoad is called before applicationDidFinishLaunching.
I'm not certain yet, but I think it has to do with how the nib files are configured to point to which file owners. Hopefully, this is a clue that can point you in the right direction.
Replies
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesomeam curious though as to why my initial view is being called before appdidfinishlaunching?
anyone had this problem before?
cheers
Bug
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesomeit seems to trigger the view's ViewDidLoad. My solution for the moment is just to move that line to after all my tweaks to ApplicationDidFinishLaunching. If you are doing more interesting things in ApplicationDidFinishLaunching, perhaps this not the best solution. I am just loading some plists, so it doesn't cause me any problems.
An alternative, I suppose, would be for ApplicationDidFinishLaunching to call ViewDidLoad (or some other method) just before it does the MakeKeyAndVisible call.
Does this make any sense?
-John.
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeI'm not certain yet, but I think it has to do with how the nib files are configured to point to which file owners. Hopefully, this is a clue that can point you in the right direction.
Still working on it.
Bill
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome