         prepareTeam()
     }
     
+    private func prepareUserInterface() {
+        self.title = isAdd ? "新しいチームの作成" : "チーム設定"
+        if !isAdd {
+            navigationItem.rightBarButtonItem = nil
+        }
+    }
+    
     private func prepareBackgroundView() {
         let image = team.loadTeamImage().teamImage?.retina
         BackgroundView.notifyChangeImage(image)

class TeamEditViewController: UIViewController {
    
    // MARK: ファクトリメソッド
    class func create(for team: Team) -> UIViewController {
        return R.storyboard.teamEditViewController.instantiate(self) { vc in
            vc.team = team
        }
    }
    

    
    private func prepareTeam() {
        Realm.Team.clearValidateResults(team)
    }
    
    @IBAction func didTapCompleteButton() {
        AlertDialog.showConfirmNewSave(
            from: self,
            targetName: "チーム",
            save: { [unowned self] in
                Realm.Team.save(self.team)
                
            },
            dispose: { [unowned self] in
                Image.delete(category: .teams, id: self.team.id)
                self.dismiss()
            }
        )
    }
}

