Tag Archives: iOS Presenting view controllers on detached view controllers is discouraged

iOS Presenting view controllers on detached view controllers is discouraged

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

0x00 a log warning ⚠️

presenting view controllers on detached view controllers is discovered
rendering view controllers on detached view controllers is not encouraged
in this paper


The scene of the accident

Add View of controller B to View of controller a
handle a video playback event in controller B
use avplayerviewcontroller
result after playback, can’t Close

Check the console and find a message from the system:
presenting view controllers on detached view controllers is discovered
full face ❓❓


0x02 parent controller

After flipping through stack overflow
we found such a key code:
[self.parentviewcontroller presentviewc ontroller:viewController animated :YES c ompletion:nil ];

Quickly change self to self. Parentviewcontroller
Oh, fire 🔥
no ~

no

Before adding View of controller B ,
did not add controller B to controller a
first 😓


Verification code input box

https://github.com/xjh093/JHVerifyCodeView


Five strokes learning, so simple