However when I run, instead of the Done button on the right of my navigation bar I have an Edit button. If I change .rightBarButton to .leftBarButton my Done button appears on the left as expected, but the Edit button is again there on the right.

Am I supposed to specially remove this unwanted Edit button in code, or am I doing something wrong that is making it appear in the first place? If I have to remove it, how do I go about doing so?