I’ve got the following function which compiled cleanly previously but generates a warning with Xcode 8.

func exitViewController()
{
    navigationController?.popViewController(animated: true)
}

“Expression of type “UIViewController?” is unused”.

Why is it saying this and is there a way to remove it?

The code executes as expected.

7 Answers
7

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *