Questions tagged [viewdidappear]

UIViewController instance method that notifies the view controller that its view was added to a view hierarchy.

261 questions
2
votes
1 answer

Flutter: Focus keyboard on back navigation

I want to focus a textField after the user navigated back with the back button in the navigation bar. How do you do that? I tried the autofocus property of the TextField widget. But this only works when navigating forward when the widget gets…
Renato Stauffer
  • 738
  • 2
  • 14
  • 30
2
votes
2 answers

viewDidAppear being called strangley

I have a viewController containing segmentedControl. I have a VCA and VCB which are in the segmentedControl. When I tap on second segment VCB appears. Now I am pushing another ViewController from VCB. But when coming back from that viewController,…
2
votes
2 answers

ViewDidAppear and ViewWillAppear is being called multiple times on one viewDidLoad in ios swift app

I am making iPhone app on swift,here ViewDidAppear and ViewWillAppear is being called multiple times on one viewDidLoad in ios swift app? please help me.
sulabh qg
  • 1,155
  • 2
  • 12
  • 20
2
votes
1 answer

The NavigationBar Tint Color doesn't change when I press BackButton Xamarin.iOS

I have two ViewControllers in my app. I am using Xamarin.iOS. I want to navigate from VC1 to VC2 and change the background color of NavigationBar (BarTintColor) so different VCs should have different NavigationBarColors. Code in VC1: public override…
2
votes
2 answers

iOS viewDidAppear called before view appears

I'm working on an iPhone/iPad app with a UISplitView. In the left panel, I have a table, and the cells all have "Show Detail" segues to a Navigation Controllers for the right panel. I do some lengthy computation for the new view, after the user…
Apollo Grace
  • 361
  • 3
  • 16
2
votes
2 answers

Swift Error when calling selectRowAtIndexPath on tableview

I am trying to programmatically select a cell in a tableview. I get a SIGABORT error when hitting the selectRowAtIndexPath. myIndex has a value of 1. I am calling this from a viewController that has implemented the required tableview delegate and…
branimal
  • 97
  • 9
2
votes
3 answers

Parse - How do I check for a logged in user before the view loads?

I am trying to verify if there is a user before deciding whether to display the login/signup view controller or the logged in view controller. The issue I am running into is that to check for the presence of a user, I have to wait for…
123
  • 8,733
  • 14
  • 57
  • 99
2
votes
1 answer

UICollectionView not the right size in viewDidLoad

I have a simple UICollectionView defined in my storyboard (see screenshot). I'm using auto layout, the UICollectionView is attached to the superview for leading, trailing and top and to the toolbar for the bottom. When I display in the console the…
sebastien
  • 2,489
  • 5
  • 26
  • 47
2
votes
3 answers

iOS/Swift: in which function between viewDidLoad and viewWillAppear am I supposed to query a database?

In my app, being developed by Swift and XCode 6, I have to query a database and according to that answer then I'll modify and show some UI widgets which, in my case, are three colored buttons whose I have to change their text which consists in a…
SagittariusA
  • 5,289
  • 15
  • 73
  • 127
2
votes
3 answers

with "viewDidLoad" my viewController take much time to appear!

when i load my viewController i used "viewDidLoad"method to init my view ,but this take much time to make the view appeared .So i had the idea to use "viewDidAppear" method to accelerate the appearance of my view but the load of the informations…
Mejdi Lassidi
  • 999
  • 10
  • 22
2
votes
1 answer

iOS viewWillAppear Error: "view is not in the window hierarchy"

I have a Swift application, and what I'd like to do is that every time the app becomes active, I'd like to check for a user in session. If not found, I'd like to show a login view controller that I designed in my Storyboard. If found, I need…
John Doe
  • 1,005
  • 2
  • 8
  • 23
2
votes
1 answer

Unit tests don't call viewDidAppear method

I am using Specta to create some tests but I don't seem to be able to get this basic one to pass. The app itself works fine but this test won't pass. ViewController - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; [self…
Hodson
  • 3,438
  • 1
  • 23
  • 51
2
votes
0 answers

Sometimes there is delay between viewWillAppear and viewDidAppear, no CPU usage

I have a segue defined in storyboard from a table cell to a view controller using Modal There are 20% of chance that the lag between viewWillAppear and viewDidAppear will be extreme long (above 5 seconds), 80% of time the lag is within 1…
user2585453
  • 249
  • 3
  • 8
2
votes
4 answers

iOS: Refresh Data When App is Brought to Foreground

I'm getting data off the server via JSON and displaying it on Labels. I've added that method in viewDidLoad. I want to refresh the data when the user opens the app again. Currently, even if I kill the app in the simulator and start the app again, it…
Bilbo Baggins
  • 3,644
  • 8
  • 40
  • 64
2
votes
3 answers

Mechanism about "did" and "will" and "should" method

I want to know generally when the methods including the key words stated in the topic were called. For example: – tableView:willSelectRowAtIndexPath: – tableView:didSelectRowAtIndexPath: - (BOOL)tableView:(NSTableView *)aTableView…
JackieLam
  • 668
  • 1
  • 7
  • 20