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

iOS Push Segue only performs sometimes

I've got this really weird bug on my code, and I have no idea on how to solve it. I'm using the stroryboard scheme as shown on the picture attached. One navigation controller, that performs a push segue programatically, and, when clicking the "Find"…
Arthur Camara
  • 578
  • 8
  • 19
0
votes
1 answer

How to improve efficiency with AddChildViewController

I am using AddChildViewController and adding a CalendarViewController, here is the code to add it - (void)calButtonClicked { m_calViewController = [[CalendarViewController alloc]initWithNibName:@"CalendarViewController" bundle:nil]; …
Ranjit
  • 4,576
  • 11
  • 62
  • 121
0
votes
2 answers

UIView is never rendered if added as subview in viewDidLoad

I'm trying to add a subview to a view controller programatically, but it seems like if I add the subview in the viewDidLoad of the view controller whatever I have added as subview in the view itself is not rendered in the view controller. But if I…
Roland
  • 9,321
  • 17
  • 79
  • 135
0
votes
2 answers

presentModalViewController viewDidLoad not being called

I have an event which calls a view to appear, but the -viewdidload event isn't appearing as expected each time it's called. Here's the method I use to call it... [self presentModalViewController:addItemViewController animated:YES]; then inside the…
Matt Facer
  • 3,103
  • 11
  • 49
  • 91
0
votes
3 answers

Reloading viewDidAppear so it will function as ViewDidLoad

In my viewDidAppear i"m changing the frame of one of my ImageViews. The view and all the other methods will not show it until i will [self viewDidAppear] it. I feel its not right, is there some reloadData message ? Thank you.
Yevgeni
  • 1,533
  • 17
  • 32
0
votes
1 answer

Reload viewcontroller

How can I refresh a viewcontroller?. I.e. I have a series of animations that run into the viewdidload and want to reload the viewcontroller again, really it would be reload the viewdidload again? It would be an action assigned to a UIButton thanks
user1908661
  • 89
  • 3
  • 9
0
votes
2 answers

Initialize ViewController in iOS 7

I used to initialize my UIViewController in - (void) viewDidLoad. Since the update to iOS 7 the viewDidLoad method is either not called or after executing setItemAndParents. Example: I have a UITableViewController if you click on a cell the desired…
Thorsten Niehues
  • 13,712
  • 22
  • 78
  • 113
0
votes
2 answers

How to resize UILabel in viewDidLoad

I tried to change UILabel.frame with a button and it works correctly: - (IBAction)changeSize:(id)sender { CGRect rec = self.labelHello.frame; rec = CGRectMake(20, 20, 280, 300); self.labelHello.frame = rec; } But…
0
votes
1 answer

iPhone SDK: viewDidLoad() sees an empty NSArray, but it's populated in a delegate method (MGTwitterEngine)

This is probably obvious, but I'm a bit of a newbie and have spent hours trying to figure this out. In viewDidLoad() I have a call to a function on an MGTwitterEngine object (custom object), with an input. If the request (to Twitter, in this case)…
Parimal
  • 15
  • 6
0
votes
1 answer

iOS timed image reload

I have a web cam I'm pulling images from for an iPhone app. I put the code that pulls the image into the view in viewWillAppear. That works pretty well but what I really want is to reload the image every 30 seconds. Is there a setInterval equivalent…
Juniper Jones
  • 779
  • 6
  • 10
0
votes
1 answer

Is it ok for subclass of a UIViewController to do some initialization in viewDidLoad before calling super?

So, here is the situation. I have a base class SSSAdEnabledTableViewController with a XIB file that has a _contentView inside the main view and and _tableView inside that view. The base class is being used to render/hide ads. I then have numerous…
Dan Nichols
  • 55
  • 1
  • 6
0
votes
1 answer

Tableview refreshes data every time

First, i have a slide application, there i have a tableview. By tapping a cell "CellInMainMenu" in the main menu, application opens tableview "TV1" by push, and cells in this tableview("TV1") fill with data by an array. When i slide this…
0
votes
2 answers

iphone - getting UIImageView to repeatedly move

Background: I am using xcode 3.1.4 and iphone simulator 3.1 (I know it's outdated and please dont comment about that). Goal: I am trying to get a UIImageView that is created once the view loads to continuously move down. Creating the UIImageView…
0
votes
1 answer

iOS Unable to simultaneously satisfy constraints in loadView

I'm getting the Unable to simultaneously satisfy constraints error. I don't get the error when the viewcontroller establishes itself using viewDidLoad but it does get the error when using loadView... Why is this happening? I thought the only…
Sethypie
  • 549
  • 6
  • 21
0
votes
0 answers

UIView partially loaded from xib in viewDidLoad

In my controller I'm loading all its content programmatically inside the viewDidLoad method, and everything has always worked just fine. However I'm implementing a new feature which is just a view to show at a certain point, and I decided, in order…
dev_mush
  • 2,136
  • 3
  • 22
  • 38