Skip to content

Instantly share code, notes, and snippets.

@masakid
Created May 2, 2015 05:29
Show Gist options
  • Select an option

  • Save masakid/63c188d24911d68797fe to your computer and use it in GitHub Desktop.

Select an option

Save masakid/63c188d24911d68797fe to your computer and use it in GitHub Desktop.
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var prefectureLabel: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func exitFromTable(segue: UIStoryboardSegue) {
}
@IBAction func exitFromTableTap(segue: UIStoryboardSegue){
if let table = segue.sourceViewController as? TableViewController{
if let index = table.myTableView.indexPathForSelectedRow(){
self.prefectureLabel.text = table.prefecturalArr[index.row]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment