Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 11-26-2009, 09:47 AM   #1 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 1
Default Changing view in viewDidLoad function

That's the code from viewDidLoad in the main view controller:
Code:
        NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
	NSString *userNameTemp = [prefs stringForKey:@"UserName"];
	if (userNameTemp == nil){
		[self presentModalViewController:editViewController animated:YES];
		NSLog(@"I'm inside");
	}
Even though the condition is met, view doesn't change. Why is that? I get no errors, no warnings and [self presentModalViewController:editViewController animated:YES]; works in another function (when it's invoked by button). Any tips?
jacek is offline   Reply With Quote
Reply

Bookmarks

Tags
view, viewdidload

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 336
19 members and 317 guests
ADY, Alsahir, Dani77, Duncan C, F_Bryant, Grinarn, HemiMG, Herbie, jansan, linkmx, macquitzon216, mer10, Monstertaco, prchn4christ, Robiwan, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:40 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0