1

[ViewController] Calling -viewDidAppear: directly on a view controller is not supported, and may result in out-of-order callbacks and other inconsistent behavior. Use the -beginAppearanceTransition:animated: and -endAppearanceTransition APIs on UIViewController to manually drive appearance callbacks instead. Make a symbolic breakpoint at UIViewControllerAlertForAppearanceCallbackMisuse to catch this in the debugger

May i know the exact reason causing this issue.

Thanks in advance

Joakim Danielson
  • 43,251
  • 5
  • 22
  • 52
Senthil
  • 510
  • 12
  • 28
  • You can only call `viewDidAppear:` in the override of the method itself to call its super: `[super viewDidAppear:animated];`, if you called yourself `viewDidAppear:` elsewhere, you'll get that message. It's hard to tell without code. – Larme Apr 10 '23 at 20:14

2 Answers2

0

It seems, from the error message, that you are calling viewDidAppear:. Never do that (except to call super from within your implementation). It is an event method to be called by the runtime, not by you. That is what the error message is telling you.

If for some reason you don't know how to find your code where you are making this mistake, the error method also tells you how to set a breakpoint to find it when it happens.

matt
  • 515,959
  • 87
  • 875
  • 1,141
0

You can't call the viewDidAppear: method by yourself.

Instead put whatever code you have inside viewDidAppear: and relocate to a new method which you define yourself. Then you can call that method just as you are calling viewDidAppear: now :)

CTABUYO
  • 662
  • 2
  • 7
  • 27