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 [UITableView reloadData] vs new instance of that UITableView class on ViewWillAppear parent class

Im new to iOS programming and I have created my first app for iPad which handles several views. Since I dont know how memory and objects are managed (The app havent crashed but Im trying to prevent them) I have this question. In general Which is…
Symphonicmind
  • 100
  • 2
  • 2
  • 6
0
votes
2 answers

Load data from NSUserDefaults in ViewDidLoad

In the start screen of my app you are able to choose language between English and Swedish by clicking on either the flag of UK or Sweden. The problem is that the ViewDidLoad does not recognize changes in the NSUserDefaults when you click a button.…
Mangy92
  • 621
  • 1
  • 10
  • 25
0
votes
2 answers

How to use variables created outside of viewDidLoad

Hey I'm very new to Objective C programming and I'm stuck. How come when I create I function, it can't use the variables I created for the labels or textviews, etc. And whenever I call them in the viewDidLoad function, I have to do either…
Sanchit Gupta
  • 1,283
  • 2
  • 11
  • 8
0
votes
1 answer

What functions are called between subview's awakeFromNib and view's viewDidLoad?

I have a UIView/UIViewController (UIViewController) within storyboard that contains a custom UIView (CustomView) that has an associated .xib file. I am encountering the following phenomenon when I load UIViewController: CustomView's awakeFromNib…
0
votes
1 answer

Why sometimes viewDidLoad is called first and sometimes it's called latter?

-(void) tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { [[NSNotificationCenter defaultCenter] postNotificationName:ListOrMapAddReloadButton object:self]; //Add nearby…
user4951
  • 32,206
  • 53
  • 172
  • 282
0
votes
1 answer

iPhone UIViews sleeping/dying after being brought back into view

I need some help. This seems to be a common problem I am having when am adding and changing views in my coding. And I would love to learn what I am doing wrong. Currently I am adding and removing views using the following calls from my view…
JordanC
  • 4,339
  • 1
  • 22
  • 16
0
votes
3 answers

[self viewDidAppear:YES];

Does [self viewDidAppear:YES]; in the viewDidLoad section of code ensure that the viewDidAppear section of code will run? Based on feedback from a small subset of our users, it appears for whatever reason that the code I have written in the…
RanLearns
  • 4,086
  • 5
  • 44
  • 81
0
votes
3 answers

ViewDidLoad is not called for the second time Xcode

I have a tableViewController from which i navigate to UIViewController. To save the value of indexPath.row I have used an integer and based on that integer action is performed in UIViewController. Problem is that when I press the back button and…
Usman Ali
  • 145
  • 3
  • 15
0
votes
0 answers

ios6 custom segue and ViewDidAppear

This might be an obvious question, but I cannot figure out the correct solution to this problem. I have a custom segue class, which works in that it successfully transitions to the destination controller. In the destination controller, I need to get…
minus
  • 320
  • 1
  • 5
  • 14
0
votes
1 answer

UIImagePickerController in TabBarController

I am trying to implement the imagepickercontroller inside a UITabBarController. So far, so good.... In my ViewController, where I initiate the imagePickerController and then place in my TabBarViewController tabbar array, I implemented the…
0
votes
1 answer

put the sigUp form(includes several textField s) into the scroll Viewer template(iphone)

I have designed a sign up form like following , which contains several textfields and every time user clicks on a textfield the keyboard comes up or the datePicker for birthday date. the sign up form comes up using tap. But the form itself jumps up…
user2074150
0
votes
3 answers

What could be overriding UIButton attributes from viewDidLoad?

I load some defaults and set UIButton customizations in my viewDidLoad method. The defaults load fine. However, the UIButtons do not get their customization. When I put the exact same UIButton code in an action button to trigger the customizations -…
Kyle Luchinski
  • 153
  • 1
  • 4
  • 18
0
votes
4 answers

Disable a UI button at launch

I am stuck trying to disable a UIButton at launch. I want the button to be disabled at launch and to be able to enable it using other buttons within the app. I can disable it in the .xib from the attributes inspector, but then the following code…
Kyle Luchinski
  • 153
  • 1
  • 4
  • 18
0
votes
1 answer

View frame changed in the iPhone 3.5" simulator from iPhone 4-inch screen xib

I made a viewcontroller XIB as 4" retina screen and put a custom view at the bottom. And I run the app on the iPhone4 3.5" simulator. My app should be supported on most of iPhone versions, so I set the view's frame on the view controller's…
ttotto
  • 826
  • 3
  • 13
  • 31
0
votes
1 answer

Custom object in prepareForSegue is different from viewDidLoad

Here is what i am trying to achieve: I programmatically add a set of custom objects. Each of these on tap should perform an existing segue. In performForSegue, I set some property of the destinationViewController. Here is the setup: I have a custom…
vishwa
  • 83
  • 6