1
tableview 내에 BackendlessUsers 배열이 있습니다. didSelectRowAtIndexPath 함수 내에서 사용자를 전달하려면 어떻게해야합니까?Swift/tableView instantiateViewControllerWithIdentifier로 데이터 전달
var deejays: [BackendlessUser] = []
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
print("You selected cell #\(indexPath.row)!")
self.tableView.deselectRowAtIndexPath(indexPath, animated: true)
**let user = deejays[indexPath.row]**
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let vc = storyboard.instantiateViewControllerWithIdentifier("DJProfileAsUserVC") as! DJProfileAsUserVC
dispatch_async(dispatch_get_main_queue()) {
self.presentViewController(vc, animated: true, completion: nil)
}
}
도움말에 감사드립니다.
@property in swift? :/ –
죄송합니다, 편집하겠습니다. – vladiulianbogdan
완료. 이것이 당신이 원하는 것이라면 알려주십시오. – vladiulianbogdan