Questions tagged [viewwillappear]

UIViewController instance method that notifies the view controller that its view is about to be added to a view hierarchy.

View controller subclasses typically override viewWillAppear to perform any tasks to customize the display of the view, based on the context in which the view is being displayed, as described in the documentation.

292 questions
3
votes
2 answers

Swift viewWillAppear not being called first time usingTabBarController

So i have a tab bar controller and when I select into the second tab it brings me to a table view controller. I have it setup so that when the viewWillAppear it animates the cells in. The problem I am having is that the first time I go into that…
Dallas
  • 1,788
  • 2
  • 13
  • 24
3
votes
3 answers

Is it necessary to call super in viewWillAppear?

I am trying to understand the scenario of the method calls to view did/will appear and disappear. What I did is selecting the table cell (higlights in grey) , go to detail view and go back and deselect the selected row (remove the selected cell grey…
Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109
3
votes
0 answers

Xamarin iOS Login Flow with Auth0

I'm getting weird behavior in my application where the user is prompted with my login screen when I'm using Auth0. I store my token using Auth0's Account feature. I check to see if the token exists and if the token is null, prompt user with Login…
Cambo360
  • 31
  • 2
3
votes
3 answers

Is it a MUST for viewWillAppear to have [super viewWillAppear] method as well

I placed my code for iAd/AdMob ads in... -(void)viewWillAppear:(BOOL)animated{} Ads work perfectly fine the way I have them now on all iOS devices. When I connected my iPhone to Xcode and clicked on Product -->Analyze a message states... The…
Jet
  • 555
  • 1
  • 7
  • 19
3
votes
0 answers

viewWillAppear and viewDidAppear called - viewDidLoad not

I have a ViewController that calls viewWillAppear and viewDidAppear without calling viewDidLoad. How can this be?
YogevSitton
  • 10,068
  • 11
  • 62
  • 95
3
votes
1 answer

Why does adding subview in viewDidLoad doesn't work

I was trying to add UIToolBar into a UIWebView but whenever I insert this code inside viewDidLoad UIToolBar doesn't show up, however when this is done in viewWillAppear, it works. Can someone please explain it to me. -(void)viewDidLoad { [super…
user3526002
  • 537
  • 2
  • 8
  • 19
3
votes
2 answers

Xamarin IOS hide bar back button

I am trying to hide the back button from my navigationcontroller on a certain view(using storyboard) I tried to hide the bar back button overriding the ViewWillAppear, but it does not seem to happen. Here is the code: public override void…
Emil Elkjær
  • 685
  • 1
  • 9
  • 31
3
votes
3 answers

UINavigationBar disappears iOS7

I have some wierd bug with UINavigationBar. Sometimes it just disappears (actually if you move view to the half of screen, and then just release it) Video example In the first ViewController's viewWillAppear: method i…
3
votes
3 answers

How to avoid viewWillAppear initially calling

I want to know something aboutViewWillAppear.I have a viewwillappar method for data refreshing. What I want to do is when this viewcontroller push from the previous one this refreshing should not be happen. (when initially loading this controller…
user2889249
  • 899
  • 2
  • 13
  • 22
3
votes
4 answers

Toolbar items dissapear when view changed with UIActionSheet

When initiating a view from a UIActionSheet button, upon returning to the view via the navigationBar back button, the toolbar while still visible does not have any of the buttons that were previously on it. This error has arisen since updating to…
Jace
  • 145
  • 2
  • 11
3
votes
0 answers

viewWillAppear, viewDidAppear not called with pushViewController

NewViewController_iPhone *newViewController = [[NewViewController_iPhone alloc] initWithNibName:@"NewViewController_iPhone" bundle:nil]; [self.navigationController pushViewController:newViewController animated:YES]; viewWillAppear: and…
soleil
  • 12,133
  • 33
  • 112
  • 183
3
votes
1 answer

Navigationbar not showing on pushing view controller

I have working on navigation base application. my problem is that when i am push other view controller into navigation controller .view controller viewWillAppear is not called. TestCategoryHistory *testVC = [[TestCategoryHistory alloc]…
3
votes
1 answer

viewDidAppear and viewWillAppear not getting called on the iPad

I am calling a settings page as a form sheet over a viewController using the following code: NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults]; NSString *device = [standardUserDefaults objectForKey:@"Device"]; if ([device…
2
votes
2 answers

May I use viewWillAppear instead of viewDidLoad for most of my initialization and setup?

I'm not good in communicating between controllers, so i need to setup and check a lot from NSUserDefaults, may it cause any problems?
Horhe Garcia
  • 882
  • 1
  • 13
  • 28
2
votes
3 answers

What method is called after [self.navigationController popViewControllerAnimated:YES];?

I have this code : -(IBAction)OkButtonPressed:(id)sender{ NSLog(@"BTN OK"); RecherchePartenaireTableView *recherchePartenaireTableView=[[RecherchePartenaireTableView alloc]init]; recherchePartenaireTableView.mytext=textFieldCode.text; …
Gabrielle
  • 4,933
  • 13
  • 62
  • 122