viewdidload Questions

1

Solved

I want to know the key difference between awakeFromNib() and viewDidLoad() to get more clarity on how it works . Please can anybody explain?
Retrorse asked 13/8, 2015 at 15:55

8

In Apple's scrollView example they don't call that. I always thought that's a must. Why should I call that anyways?
Goldenseal asked 5/5, 2009 at 12:43

2

Solved

I'm implementing my own 'back' button. Where onClick, the following code is executed in the ViewController (VC) being dismissed: Dismiss current VC (VC#1) Pop current VC (VC#1) off my custom navi...
Dickman asked 28/7, 2014 at 2:34

2

Solved

I am trying to set a global variable. In my case, just a boolean flag that indicates if a view is being presented for the first time: var initialLoadFlag: Bool = true After the view is presented...
Gefen asked 21/7, 2014 at 14:49

1

Why does UITableView take more time to load when the number of rows is large? What is it that takes time between viewDidLoad and the first cellForRowAtIndexPath function call? These are the log s...
Worthless asked 5/2, 2014 at 12:58

3

Solved

Is there a BOOL or some other way of knowing if viewDidLoad: has been called? I need to change a view property every time my view has entered active, but if the view hasn't ever been loaded, I don...
Rakehell asked 18/10, 2013 at 21:3

2

Solved

I'm using SWRevealViewController in my app (to get the slide out side panel) however whenever the user navigates to another viewController like 'settings' and comes back, everything gets reset. I u...
Retrogressive asked 10/10, 2013 at 9:37

7

Solved

What is the difference between viewDidLoad() and LoadView()? In what way are they different from each other? Which one is better when we develop applications without using XIB ? Thanks .
Pollitt asked 2/3, 2011 at 5:41

5

Solved

I've got a question regarding the two mentioned methods, since in my tests I don´t make clear the order they are called. I thought that, firstly, viewDidLoad is called when the viewController is lo...
Norvol asked 28/6, 2013 at 10:2

4

Solved

It is my understanding that awakeFromNib will always be called before viewDidLoad. So I have a subclass of a UITableViewController, which is unarchived from a xib file. I defined these two method...
Intensifier asked 10/6, 2011 at 6:14

3

Can anyone explain why viewDidLoad does not get called when loadView is used? It's my understanding that viewDidLoad should still get called. - (void)loadView { CGRect currentFrame = [[UIScreen m...
Procreate asked 11/1, 2011 at 0:26

2

Solved

I get used to put either of viewWillAppear and viewDidLoad, it's OK until know. However I'm thinking there should be some rules that guide when to put into viewWillAppear and when to put into viewD...
Guillemot asked 23/1, 2013 at 4:7

1

Solved

Possible Duplicate: UIViewController returns invalid frame? While debugging i've noticed that in viewDidLoad call my view frame is origin=(x=0, y=20) size=(width=320, height=460) whic...
Deal asked 19/12, 2012 at 17:19

1

Solved

Head's up: This question is related to the recent deprecation of viewDidUnload. I have seen "great" and logical answers around this topic, but apparently they were proven wrong. Proceed with cautio...
Ogee asked 31/10, 2012 at 6:20

1

What is the difference between the two methods didFinishLaunchingWithOption and viewDidLoad? The former is a method of AppDlegate.m and the latter is a method of ViewController.m, but both of them...
Eudo asked 24/10, 2012 at 16:12

1

Solved

I am learning Core Animation and trying out sample examples. When I use the following code, the animation duration works @implementation ViewController - (void)viewDidLoad { [super viewDidLoad];...
Lyontine asked 18/10, 2012 at 1:53

1

Solved

Okay. If you have two viewControllers and you do a modal Segue from the first to the second, then you dismiss it with [self dismissModalViewControllerAnimated:YES]; it doesn't seem to recall viewDi...
Typographer asked 30/8, 2012 at 15:41

2

Solved

My app is based on a tab bar architecture. In order to have an easy internationalisation mechanic, I do not write any string in XIB files. viewdidload permits to change programmaticaly the strings ...
Matazzoni asked 15/6, 2011 at 16:25

4

Solved

I have an iOS application. Application has 2 different views: Main and Settings. In fact, application needs to load and initialize some library and framework before it is used in Main View. When I...
Buster asked 4/4, 2012 at 6:38

3

Solved

Does Android have an equivalent to Cocoa's viewDidLoad and viewDidAppear functions? If not, then how would I go about performing an action when a View appears? My app is a tabbed application, in ...
Socrates asked 18/8, 2010 at 14:56

2

Solved

I need a way of calling the viewDidLoad method when the 'back' button is pressed in the UINavigationController. So for example if I have a flow like so: View A -> View B -> View C I need the i...
Caliber asked 20/1, 2012 at 17:48

3

Solved

I'm trying to figure out from Apple's sketchy documentation which method is the best place to be initializing and adding my Views controls to the controller's view. With winforms it's fairly strai...

3

Solved

I've been trying to understand for hours when I should use the viewDidload: and when I should use initWithNibName: to set up the properties of my viewController. For instance, I'm using a TableVi...
Dyslogia asked 4/1, 2012 at 23:5

1

Due to the keywords "did" and "will" in UIViewController, I have am unsure where to put the code before/after calling super in viewDidLoad and viewWillAppear, in order to make the code run effectiv...
Attest asked 26/10, 2011 at 10:13

2

Solved

I have a pretty basic setup with a UINavigationController inside a UITabBarController. I'm wanting to programmatically layout the view of the rootViewController of that navcontroller, but when I lo...
Eva asked 20/7, 2011 at 4:29

© 2022 - 2024 — McMap. All rights reserved.