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
-1
votes
1 answer

Unhiding UIImageView not working

I initially hide the UIImageView in viewDidLoad function using this…
Adhish
  • 134
  • 8
-1
votes
3 answers

Calling an animation only once in ViewDidAppear even reloading the view

I am having a problem in an animation of a view. Firstly, I made an animation within ViewDidLoad method. It works perfectly. Then within the view, I need to call out another view from the storyboard by storyboard ID using the below…
Clarence
  • 1,951
  • 2
  • 34
  • 49
-1
votes
1 answer

Property text not found, in viewdidload. Segue not working

Hello fellow programmers. This error has been bugging me for a couple of hours and I just do not seem to get it. Error shows as follow property 'text' not found on object of type "UITableview". I tried to do a segue from one screen containing two…
Dave1991NL
  • 13
  • 4
-1
votes
1 answer

Terminating App Due to Uncaught Exception. "nil string parameter"

My app was working fine this morning. I updated to Xcode 5.1 and when I run my app, it crashes when I hit play. My app has a modal button that leads to another view controller. The first view controller is the main screen. I start the app, press the…
mlacava
  • 5
  • 1
  • 4
-1
votes
1 answer

Call viewdidload from appDelegate

I want to call the viewDidLoad in my view controller from my appDelegate. How do I do so? - (void)applicationDidBecomeActive:(UIApplication *)application { TCAViewController *uiTCA = [[TCAViewController alloc] init]; if(uiTCA.failed ==…
4GetFullOf
  • 1,738
  • 4
  • 22
  • 47
-1
votes
3 answers

Initialize property from another class in Objective c

Hi guys I'm new to objective c and i was searching for an c++ or java like way to initialize an objects properties from another UIViewController class. So I used the -init function which seems to work terrific, but the problem is that after some…
John Bassos
  • 308
  • 1
  • 10
-1
votes
2 answers

How to reload view when returning to a tableview?

I have an app where a user can select the default tab they want loaded when they open the app. I have a settings table view controller that I've created in a storyboard. I have it set to static cells and created a cell that the user can press and…
Milo
  • 5,041
  • 7
  • 33
  • 59
-1
votes
2 answers

NStimer starting on view did load, giving false times! objective C iPhone

I am starting a timer with view did load - (void)viewDidLoad { [super viewDidLoad]; locationManager.delegate = self; [NSTimer scheduledTimerWithTimeInterval: 10.0 //interval here must be a float target: self …
stackOverFlew
  • 1,479
  • 2
  • 31
  • 58
-1
votes
1 answer

How do I load a saved image using ViewDidLoad

I'm making a painting app, and I currently have the app at a point where it saves drawings, but it still can't load the drawings back into the view once the app has quit or switched views. I'm saving the image with…
2456789
  • 69
  • 1
  • 10
-2
votes
1 answer

save a image into binary data by creating a image object

In my swift code the goal is to save a image into core data. My code right now is not working. Its not the right type. The code works if it is a string but trying to save it to binary data is not working. I tried creating a UIImage object and it is…
jj smith
  • 49
  • 4
-2
votes
1 answer

Why it print out an empty array instead of the array appended with values for the first time in viewDidLoad()?

I'd like to have an array appended with values from database in viewDidLoad() so that I can extract a value and assign it to an UILabel.text after loading the view. The codes: var tagArr = [Tag]() override func viewDidLoad() { …
ting pan
  • 3
  • 2
-2
votes
1 answer

Conflicting calls to viewDidLoad() and another block of code

Screen in question I am trying to call the viewDidLoad() func here with the question() func a set number of times and only then call the code for the new view controller to be pushed. But, the code for both is getting executed at the same exact time…
-2
votes
1 answer

'override' can only be specified on class members - Xcode 9.0, Swift 4

I keep receiving the error message "'override' can only be specified on class members" in regards to the override func. I have tried inserting a "}" before the override func but received even more errors. import UIKit class MainVC:…
-2
votes
1 answer

load latitude and longitude from API before map loads Swift 3

I'm trying to show a map with two markers with longitudes and latitudes that are retrieved from API. the function that gets the longitudes and latitudes is called in Viewdidload override func viewDidLoad() { super.viewDidLoad() …
AlmoDev
  • 969
  • 2
  • 18
  • 46
-2
votes
1 answer

Why does Apple recommend us to not invoke viewWillLoad, viewWillAppear, viewDidDisappear, etc.?

I'm following an exercise from a book and we're building out the view controllers programmatically and creating unit tests. The book also says this, and from previous experience with reading Apple reference docs, Apple references always say to not…
Laurence Wingo
  • 3,912
  • 7
  • 33
  • 61