Skip to content

在pushviewcontroller时,viewcontroller为空进断言了 #95

Description

@mummyforever

xcode26.3 在UINavigationController+QMUI.m里的这个方法里,会出现viewController为空的情况
if ([selfObject.viewControllers containsObject:viewController]) {
QMUIAssert(NO, @"UINavigationController (QMUI)", @"不允许重复 push 相同的 viewController 实例,会产生 crash。当前 viewController:%@", viewController);
return;
}

业务流程是银联云闪付进行免登录付款时,在输入完密码后即将跳转到支持结果页时,出现viewController为空。如果在这个类的46行load方法里添加return,不执行后续的方法重写,是能正常跳转的

Image Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions