From b87fec5b90802f7d3848da7faccc7310ce84df6a Mon Sep 17 00:00:00 2001 From: nixzhu Date: Tue, 1 Sep 2015 03:00:09 +0800 Subject: [PATCH] Row Names --- Yep/ViewControllers/About/AboutViewController.swift | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Yep/ViewControllers/About/AboutViewController.swift b/Yep/ViewControllers/About/AboutViewController.swift index 13f0d860..05dda808 100644 --- a/Yep/ViewControllers/About/AboutViewController.swift +++ b/Yep/ViewControllers/About/AboutViewController.swift @@ -59,6 +59,12 @@ class AboutViewController: UIViewController { extension AboutViewController: UITableViewDataSource, UITableViewDelegate { + enum Row: Int { + case Pods = 1 + case Rate + case Terms + } + func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return aboutAnnotations.count + 1 } @@ -89,11 +95,11 @@ extension AboutViewController: UITableViewDataSource, UITableViewDelegate { tableView.deselectRowAtIndexPath(indexPath, animated: true) switch indexPath.row { - case 1: + case Row.Pods.rawValue: performSegueWithIdentifier("showPodsHelpYep", sender: nil) - case 2: + case Row.Rate.rawValue: UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.appURLString)!) - case 3: + case Row.Terms.rawValue: UIApplication.sharedApplication().openURL(NSURL(string: YepConfig.termsURLString)!) default: break