I used the ExpandTableView
of this repository on Github:
Repo -> https://github.com/SubhiH/ExpandableTableView
I need know how i connect a position of the array of this expandable view in a View in the Main storyboard, example:
Image of the ExpandableTableView
I want that when a User click for example in the cell a1 user is sent to a TableView (View) on Main storyboard. Any ideas?
答案 0 :(得分:1)
I think you are looking for the function func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath)
, that you already implemented in ExpandableTableViewViewController.swift.
There, you can add a segue to your Main View Controller, passing it the data.
if let resultController = storyboard!.instantiateViewControllerWithIdentifier("IDOfYourMainView") as? ResultViewController {
//Here you can access to the view's functions and attributes.
//You can set, for example, an imageView and set it the image you want.
//Then, when the view loads (Read next line), it should have your image loaded.
presentViewController(resultController, animated: true, completion: nil)
}