Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialmarco gulbrandsen
Courses Plus Student 420 Pointsswift 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??
1 Answer
marco gulbrandsen
Courses Plus Student 420 Pointsi 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
Jhoan Arango
14,575 PointsJhoan Arango
14,575 PointsMarco,
It's best if you post your code on here so we can take a look at what you re doing.