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
2 answers

iOS problems sharing data between view controllers

I'm having problems passing data between two view controllers. I've seen two ways to do this. One involves implementing prepareForSeque: in the segue's source view controller and another involves setting properties in the viewDidLoad: method of the…
user3731622
  • 4,844
  • 8
  • 45
  • 84
0
votes
1 answer

How to recreate UIViewController stack?

I'm writing a 'load' feature for my current iPhone app. Practically what I want to do is get the user back where s/he left off. To do so I want to recreate all the UIViewControllers appeared before. My problem is the UIViewControllers won't appear…
shinjin
  • 2,858
  • 5
  • 29
  • 44
0
votes
2 answers

Overcoming CPU power differences between iPhone 5 Series and iPhone 4 series. iPhone Optimisation

My initial view is quite heavy in terms of UI. I have the main view, a map, and a tableView all in the one view. It takes approximately 30% cpu power on the iPhone 5s to launch this screen (is this bad?) but on the iPhone 4 it takes nearly double…
DevC
  • 6,982
  • 9
  • 45
  • 80
0
votes
1 answer

iOS format UITextView.text depending upon device type

I'm trying to format the text inside a textview depending upon the device type, but it's not working. The 'else condition' always outputs in the simulator. Is this because of the viewDidLoad? #import "Rules.h" @implementation Rules @synthesize…
blitzeus
  • 485
  • 2
  • 10
  • 28
0
votes
0 answers

ViewDidLoad Not Called in UITabBar application

I am using Tabbar view controller as parent view controller. I am adding it from interface builder as shown in the below screen shot. Everything is working fine but the viewdidload,viewwillappear and viewdidappear methods are not calling from the…
0
votes
0 answers

How to save custom tableview cells separately in an array

Okay so I'm probably really noobie at programming but I've been working on this problem for a while and can't figure it out. I have an expandable tableView that dynamically "Add" and "Delete" rows. Two issues: 1) The only way I can load the…
0
votes
4 answers

iOS views retaining data

I am currently developing a multi-view app with storyboards. In each view the user can enter data, generally through text boxes or button entry. This data is then stored in arrays. My problem is this: when I transfer back to a window, viewDidLoad is…
Tony Hematite
  • 149
  • 3
  • 14
0
votes
2 answers

Accessing json structure to capture data in iOS.

I have the following code and it is working to an extent : - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. NSString *strURL = [NSString…
spacemonkey
  • 2,530
  • 6
  • 23
  • 27
0
votes
3 answers

UICollectionView loading with noticeable lag the very first time

I have a simple application that contains an in-app settings Table View Controller. When the user selects the "App Themes" cell, it segues (push) over to a UICollectionView embedded in a UIViewController. This is 12 Cells in a 3x4 fashion where…
amitsbajaj
  • 1,304
  • 1
  • 24
  • 59
0
votes
3 answers

Run a piece of code when viewController first appears

I'm using parse to store and retrieve data from and to my iOS app. My code is as follows. [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) { if (!error) { for (PFObject *item in objects) { …
user3429966
  • 95
  • 1
  • 10
0
votes
2 answers

Method called only in viewDidApper but not in viewDidLoad, why?

I created a method that sets the title of a button based on a value. This method needs to be called when opening the viewController and maybe refreshed when the controller appears again. So i created the method and I called that method in…
Gualty
  • 251
  • 1
  • 4
  • 13
0
votes
0 answers

iOS7 Pausing between viewDidLoad and viewDidAppear

I want to call a web services during viewDidLoad. After parserDidEnd only make the viewWillAppear, is that possible? -(void)viewDidLoad{ //call webservices //display LOADING INDICATOR } -(void)parserDidEndDocument:(NSXMLParser *)parser{ …
0
votes
1 answer

Changing the Theme of an iOS App with in-app settings and multiple navigation/tab bar and textField custom backgrounds

I have an app which I am working on updating. The theme right now is a generic purple which is a customised background image for each screen in the app. I set this image in the viewDidLoad of every class: UIImageView *backgroundImageView =…
amitsbajaj
  • 1,304
  • 1
  • 24
  • 59
0
votes
2 answers

Cannot get segue to work with viewDidLoad or viewDidAppear

For my view controller's viewDidLoad method implementation, it asks the user for address book access. I need to make it so that if the user taps the "Don't allow" button on the alert view window, then we will segue them to another view…
user3344977
  • 3,584
  • 4
  • 32
  • 88
0
votes
1 answer

Reloading a DetailViewController that contains a UIPageViewController

I've basically got a Master-Detail app that utilizes RestKit to pull data from a remote server. The DetailViewController acts as a data source for a PageViewController that has three viewControllers. My question only deals with two of those so I…
Ben
  • 967
  • 3
  • 9
  • 23