Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


swift xcode i have created a table view with cells and i connected the cell to a viewcontroler

swift xcode i have created a table view with cells for albums and i connected the cell to a viewcontroler and i want whenever someone chasing a different album different songs can be played can someone help me please??

Jhoan Arango
Jhoan Arango
14,575 Points


It's best if you post your code on here so we can take a look at what you re doing.

1 Answer

i fix it used the storyboard id

        albumnames = ["Shalom 1","Shalom 3","Shalom 4","Shalom 5","Shalom 6","Shalom 7","Shalom 8","Shalom 9","Shalom 10","Shalom 11","Shalom 12","Shalom 13","Shalom 14","Shalom 15","Ricardo & Family","O Jilo Sar Kamel O Del"]
        identites = ["shalom1","shalom3","shalom4","shalom5","shalom6","shalom7","shalom8","shalom9","shalom10","shalom11","shalom12","shalom13","shalom14","shalom15","ricardo_family","Jilo"]

    override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {

        let vcName = identites[indexPath.row]

        let viewController = storyboard?.instantiateViewControllerWithIdentifier(vcName)
        self.navigationController?.pushViewController(viewController!, animated: true)


maybe this will help someone else

but thx for the response jhoan