Questions tagged [viewdidload]

Method in UIViewController class (Apple iOS SDK) for managing the view. Called after the controller’s view is loaded into memory.

This method is called after the view controller has loaded its associated views into memory. This method is called regardless of whether the views were stored in a nib file or created programmatically in the loadView method. This method is most commonly used to perform additional initialization steps on views that are loaded from nib files. Available in iOS 2.0 and later.

722 questions
0
votes
3 answers

what happens if delegate doesnot exist anymore?

I came around a interesting issue while working on my app. Imagine the scenerio where There exist one object, Lets call it A. A, then creates an object(B) of some delegation based class, say NSURLConnection. A assigned itself as delegate of B,…
Harshit Gupta
  • 1,200
  • 12
  • 27
0
votes
1 answer

viewDidLoad not called for UIView Inside UITabBarController

I have got a UITabBarController in nib file. Usually 2 tabbar items are pre-added. I added third tabBar item to it by dragging a UIViewController and changing class name in identity inspector to the controller I want to load - lets say abc. When I…
NightFury
  • 13,436
  • 6
  • 71
  • 120
0
votes
1 answer

ios performSelector:withObject:afterDelay: in viewDidLoad freeze view pushed

I push my view controller into navigation In viewDidLoad method, I place this method in the end line: [self performSelector:@selector(startLoadAndParseXML) withObject:nil afterDelay:0.]; As usual in my other view controllers in my app, the view…
vietstone
  • 8,784
  • 16
  • 52
  • 79
0
votes
1 answer

CGPointMake doesn't work in viewDidLoad

I have a button that I need to move on viewDidLoad but it doesn't want to move... strange thing is that if I use the same exact code on a -(IBAction) then it moves as it should... any clue why is this happening? the code I'm using to move the button…
Blue
  • 2,300
  • 3
  • 21
  • 32
0
votes
1 answer

Programmatically unloading all views on iOS Device

Edited title I am using Core Data to store some data I collect from my server. In appDelegate's applicationDidBecomeActive, I check if the app needs to download new data (from a version-variable on my server). If it has old information, it downloads…
Sti
  • 8,275
  • 9
  • 62
  • 124
0
votes
1 answer

xcode image gallery load images one after another

I am currently developing an iPad app with four views that can be viewed with a segmented control. One of those views is an image gallery I created using UIScrollView. The problem is that all the images are being loaded into the view in the…
matteok
  • 2,189
  • 3
  • 30
  • 54
0
votes
3 answers

iPhone - self.view is nil in initWithNibName subclass, and viewDidLoad not called

I have this cascade : Somewhere in the app - (void) go { MyCustomViewController* controller = [[MyCustomViewController alloc] init]; controller.delegate = self; [controller run]; } in MyCustomViewController - (id) init { // there is…
Oliver
  • 23,072
  • 33
  • 138
  • 230
0
votes
1 answer

popViewController to a UIViewController initialized with a UIStoryboardSegue

I have a list controller that fires a performSegueWithIdentifier to load a detailViewController of the item that was selected. To initialize the detailViewController I set a property on it in the prepareForSegue that gets called before the…
0
votes
1 answer

Initializing an array with objects when iOS app loads

I've been going through some iOS examples online I came across an app where the app initializes an array and then add objects to it when the iOS app launches. Initializing works when I use (void) viewDidLoad in my implementation file but…
wackytacky99
  • 614
  • 1
  • 14
  • 33
0
votes
1 answer

How to load existing TableViewController on click of button iOS5

I created UIExamsTVC using storyboards. Once cell is clicked, it takes me to UITestVC. UITestVC has 10 questions, When I get to the last question #10, there I have a "Done" button. I would like to go back to the original UIExamsTVC once the 'Done'…
user1529412
  • 3,616
  • 7
  • 26
  • 42
0
votes
1 answer

why my iOS app just goes to @synthesize, but not go to viewWillAppear and viewDidLoad further?

My Map app has a " Select city " button to show worldCitiesList when clicked using the following code: [self.navigationController presentModalViewController:self.worldCitiesListNavigationController animated:YES]; But now the place for the " Select…
user1188849
  • 107
  • 1
  • 12
0
votes
1 answer

Recalling viewDidLoad after failed connection not working

this is my viewDidLoad function working well : - (void)viewDidLoad { [super viewDidLoad]; //iAds code adview = [[ADBannerView alloc] initWithFrame:CGRectZero]; adview.frame = CGRectOffset(adview.frame, 0, 0); …
Ali Alzahrani
  • 529
  • 1
  • 6
  • 29
0
votes
1 answer

UILocalNotification show countdown timer on startup or viewdidload

I'm working on app that sets an UILocalNotification. This is the first time I use it and I'd like to have some explanations to use it efficiently and in the best way. Which is the bast way to countdown to the time of notification expiration? I'd…
Cers
  • 169
  • 1
  • 11
0
votes
1 answer

should I write [super viewDidLoad]?

I'm writing a navigation based app. (it has modal segues too) I'm not sure if I should keep [super viewDidLoad]; call or not. should I write code after this line of code or before it? how about [super viewDidUnload]; and similars?
Milad
  • 1,239
  • 3
  • 19
  • 37
0
votes
2 answers

Can i do the initialization in a method?

For example, i got a method like this: - (void)addToRecents:(NSDictionary *)photo { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; NSMutableArray *recents = [[defaults objectForKey:@"RecentPhotos"] mutableCopy]; …
dsfdf
  • 106
  • 2
  • 7