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

Why ViewDidApper and ViewWillApper are not always called?

I have a method that sets the height of a UIScrollView and a UITextView based on the content of the UITextView. I realized that both, textview and scrollview are correctly resized when the method is call from viewWillAppear but not from viewDidLoad…
nabrugir
  • 1,839
  • 2
  • 22
  • 38
0
votes
1 answer

viewDidLoad called before an IBAction?

in my Xcode project I have a button, that does two things. First: call an IBAction Second: go to another view (segue) In the action linked to the button I set a variable to YES (global var), but in the viewDidLoad method in the linked view, its…
Philip
  • 1,068
  • 3
  • 12
  • 21
0
votes
2 answers

super viewdidload giving me a no visible @interface for uitableview declares for the selector viewdidload

Here is my current code. I have not even gotten past the viewDidLoad method override because on the line where it says super viewdidload it throws the error @interface for uitableview declares for the selector viewdidload. I am not too familiar with…
Joshua Blevins
  • 689
  • 1
  • 10
  • 27
0
votes
0 answers

UITextField resizing in viewDidLoad Method

Im working on an app that has a series of UItextFields for data entry, i wanted them to dynamically space themselves on the screen depending on the device type, and it works well, however the UITextFields have been narrowed and i can't make them…
0
votes
1 answer

Text message window in viewDidLoad pops up after everything else

I have a text message window setup in my View Controller's viewDidLoad method implementation. If a specific NSString object contains "YES", then I call my text message window's method and it pops up. All of this works fine, the only problem is that…
0
votes
1 answer

Undeclared identifier "viewDidLoad"

//Objects list //objects scroll UIScrollView *objects; objects=[[UIScrollView alloc]initWithFrame:CGRectMake(0,80,512,688)]; objects.showsVerticalScrollIndicator=YES; objects.scrollEnabled=YES; …
Andrew Savage
  • 103
  • 1
  • 7
0
votes
1 answer

use class methods for encapsulation?

i have made some @properties of uiimage view type in a class and then initialized that class in my rootviewcontroller. questions.h: @property(nonatomic,strong)UIImageView *img1; @property(nonatomic,strong)UIImageView…
user3266009
  • 55
  • 1
  • 1
  • 5
0
votes
0 answers

iOS: CABasicAnimation and UIViewAnimation ( [UIView BeginAnimation] ) Mystery in viewDidLoad

Normally I don't perform any animation in viewDidLoad. But for testing purposes, I tried to place and test these one by one within viewDidLoad: CABasicAnimation [UIView animateWithDuration:delay:options:animations:completion:] and finally the now…
Unheilig
  • 16,196
  • 193
  • 68
  • 98
0
votes
1 answer

Why UIScrollView can not scroll once dragging UIButton or UILabel from storyboard

I got the same issue here The UIScrollView can scroll when adding button or label via code, but failed when adding from the storyboard or xib. Setting the contentSize from the viewDidAppear can resolve this issue. Set up the contentSize from…
Forrest
  • 122,703
  • 20
  • 73
  • 107
0
votes
1 answer

UITableView reload - Xcode 5

I'm using an UITableView (with a Table Cell) that's embedded in a navigation controller. When the app starts, data from the SQLite3 database is read and added in the table cells. I've made a button (on the navigation bar) that will direct the user…
Jente
  • 612
  • 1
  • 8
  • 17
0
votes
2 answers

Overwriting an existing value in viewDidLoad

Is there anybody out there who could help me with a problem? I'm helping a friend with a game and we're stuck on how to overwrite an existing integer. The problem is with Objective-C in xCode. There are two viewControllers frontPage and secondPage.…
0
votes
1 answer

Cannot push a viewController inside a ViewDidload method in another Viewcontroller

I want to do something like this in my iOS application. I alredy have a splash screen and a login screen,, After the Splashviewcontroller it displays the LoginViewcontroller. Im checking some conditions inside the ViewDidloadand in a particular…
0
votes
1 answer

UINavigationController: viewDidLoad is called but doesn't affect the UI

I have this in the App Delegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; // Override…
0
votes
2 answers

Application windows are expected to have a root view controller throwing warning

Im getting this warning "Application is expected to have a root view controller at the end of application launch". Ive read all the other answers and I know why its doing it, but im not sure how to get around it. I have the following code in my…
Stonep123
  • 615
  • 3
  • 9
  • 24
0
votes
1 answer

Can the initial setup of XIB elements done anywhere else except viewDidLoad

In my application, I have a TabBarController (which has 3 ViewControllers as tabBarItems) that is presented from another ViewController (Called HomeViewController). The HomeViewController has three buttons, which on being pressed shows the…
Shradha
  • 991
  • 3
  • 13
  • 38