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

save state of uidatepicker popover which is called in two different view controllers and differentiate them

I am able to popup a uidatepicker in a uipopover and send data back to the VC that pops it. I am essentially having two such VC's(StartdateVC and endDateVC) which popup the uidatepicker. I have to save the last date and start the uidatepicker with…
kate
  • 113
  • 1
  • 5
  • 17
0
votes
1 answer

Adjust height UITableViewCell in viewDidLoad to content

I have a UITableView called Facebook that contents two buttons, sometimes only is necesary show one button, but I have a problem because there are a empty space and this is not pretty in my app. I want resize this view but, nothing happens, only the…
lightless07
  • 401
  • 6
  • 17
0
votes
2 answers

ios updateDisplay on a timer

I've got a somewhat complicated iOS user interface, where I need to reload a particular cell of a UICollectionView every second to show time (kind of like a complicated stopwatch), I also need to do a few other things every second in this call. Part…
hatunike
  • 1,967
  • 1
  • 19
  • 26
0
votes
2 answers

Why iOS6 call private method before viewdidload?

I got a problem. That when I initial a Controller I used initwithnib:bundle: method and then I think this controller has been loaded to the memory. So I call its method selectUnreadMessage to change its header. But I found that viewdidload was…
0
votes
1 answer

Title of UIAlertView is carried on to a UITextField on a different screen

Is it possible to make the title of a UIAlertView get transfered into a UITextField that is in another view when the clickedButtonAtIndex button leads to that view? So, a UITableViewCell opens the alertview when clicked, and the alertview has two…
NSul78
  • 3
  • 1
0
votes
1 answer

How to set default method when creating a new custom class?

I have created ABViewController (inherited from UIViewController). It has default methods when created (initWithNibName , viewDidLoad , didReceiveMemoryWarning). So, I wanna set more default method in my custom class such as "setInterface,setData".
0
votes
1 answer

How to call a custom made button programmatically - ios

I've made a custom button programmatically in - (void)viewDidLoad However I need to call one of its methods in -(void) viewDidAppear:(BOOL)animated I need to call [self.custom setHidden:YES] Is the buttons scope only in viewDidLoad?
user2366782
0
votes
1 answer

instance variable returning null in viewDidAppear but fine in viewDidLoad

For some reason my instance variable (in my viewcontroller) is returning null in viewDidAppear but its returning the correct value in viewDidLoad.. - (void)viewDidLoad { [super viewDidLoad]; NSLog(@"viewDidLoad:…
Parampal Pooni
  • 2,958
  • 8
  • 34
  • 40
0
votes
1 answer

ViewController from StoryBoard make ViewDidLoad called twice

I would like to make (from my StoryBoard) a ViewController that I will be able to push from anywhere by code (this ViewController will be used a lot of time, so I don't wan't to add tons of segues in the StoryBoard...). I also have to pass some…
Tim Autin
  • 6,043
  • 5
  • 46
  • 76
0
votes
2 answers

iOS viewDidLoad is not fired

In my app I am putting a sub view into a view: subViewController = [[SubViewController alloc] init]; NSArray *nibContents = [[NSBundle mainBundle] loadNibNamed:@"SubView" owner:subViewViewController options:nil]; UIView *view = [nibContents…
DanielH
  • 953
  • 10
  • 30
0
votes
1 answer

UIScrollView isn't working with Auto-layout and Segue

in the ViewController (principal), i have a UiSrcollView called scroller. It works well when i start the app. But, if i use a segue (to pass to another view controller) the uiscrollview stop to works when i return to the principal. ps.: I using the…
0
votes
1 answer

Admob get error on Xcode

I developed an app and I want to add Admob. I can't run Admob test Bannerview. Code: // Create a view of the standard size at the top of the screen. // Available AdSize constants are explained in GADAdSize.h. bannerView_ = [[GADBannerView alloc]…
coexploit
  • 29
  • 5
0
votes
2 answers

Omit [super] call when overriding view events in UIViewController. Impact?

What happens if you don't call super in your implementation of the view events (viewWillAppear, viewDidAppear etc.) of UIViewController? It seems like I've forgotten to do this before, and it's unclear to me that there was any adverse impacts.
drc
  • 1,905
  • 4
  • 22
  • 28
0
votes
3 answers

How do I define a ViewDidLoad method for a UILabel that's contained in a nib file?

I have a nib with a table cell, and within that table cell I have a UILabel. I want to make that label sizeToFit which means I have to do: - (void)viewDidLoad { [self sizeToFit]; } However my label doesn't have any code, just an outlet to a…
David Zorychta
  • 13,039
  • 6
  • 45
  • 81
0
votes
1 answer

Load data in UIPickerView before it appears

I am using a UIPickerView in a viewcontroller that is in a modal view(if that's what it's called). I've read everywhere that [picker reloadAllComponents]; in viewDidLoad should do the trick, but it doesn't. I have overridden the…
Sti
  • 8,275
  • 9
  • 62
  • 124