"Expression of type "UIViewController?" is unused".

    xiaoxiao2021-03-25  154

    func backVC(){

        self.navigationController?.popViewController(animated:true)

    }

    运行时的时候报警告"Expression of type "UIViewController?" is unused".

    主要是swift2都有一个默认可以废弃的结果

    在swift3.0情况下修改方式如下

    func backVC(){

        _ = self.navigationController?.popViewController(animated:true)

    }

    转载请注明原文地址: https://ju.6miu.com/read-4516.html

    最新回复(0)