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

How to use object received from NSNotification in viewWillAppear:

Here is my method that my ViewControllerA implements as part of a NSNotification system: - (NSInteger)updateTortoiseLevel:(NSNotification*)notification { _updateValue = 0; if ([notification.name isEqualToString:@"gameToTortoise"]) { …
-1
votes
1 answer

Direction of view disappear

I'm looking for a way to indicate that the method viewWillDisappear run only when the flow of my Broadening go back and not forward. Thanks!
PlugInBoy
  • 979
  • 3
  • 13
  • 25
-1
votes
2 answers

iOS and xcode: how to create a modal segue to a special view only the first time the app is used

I want to make a "terms and conditions" screen that pops up the very first time that app is opened. On this view I would add a button that says "agree," and upon clicking it the code would execute: [self dismissViewControllerAnimated:YES…
jake9115
  • 3,964
  • 12
  • 49
  • 78
-1
votes
1 answer

set UIView Frame in viewDidAppear, to solve frame issues in iPad for Launch orientation mode Landscape

I am launching my app (iPhone and iPand) in landscape mode. I found that frame for iPad frame changes in viewDidAppear , than the one in viewWillAppear. IOS IPAD 5.1 simulator In viewWillAppear it is 0.000000 20.000000 768.000000 1004.000000. while…
NNikN
  • 3,720
  • 6
  • 44
  • 86
-2
votes
1 answer

Load CAShapeLayer With UIButton on viewWillAppear Method

I have a custom button with some shadow effect, following class i am using to create a custom button which i got from stackoverflow. It users CAShapeLayer to give effect of shadow on button. import UIKit class CustomButton: UIButton { var…
Deepak
  • 1,030
  • 2
  • 10
  • 21
-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
-3
votes
1 answer

How do IOS know which viewController is being viewed and hence need viewWillAppear to be called

How does iOs know? Does each view has a pointer to it's controller? What happened? When we pop a viewController from navigation, does the navigationController arrange which view should be called? For example: If I added: [[BNUtilitiesQuick window]…
user4951
  • 32,206
  • 53
  • 172
  • 282
1 2 3
19
20