func numberOfSectionsInTableView(tableView: UITableView) -> Int {
// #warning Potentially incomplete method implementation.
// Return the number of sections.
return 1
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete method implementation.
// Return the number of rows in the section.
return shop.count
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell : DesignerResViewCell = tableView.dequeueReusableCellWithIdentifier("DesignerResViewCell") as! DesignerResViewCell
cell.designerLabel.text = shop[indexPath.row]
cell.addressLabel.text = shop[indexPath.row]
cell.homeLabel.text = shop[indexPath.row]
cell.reserLabel.text = shop[indexPath.row]
cell.favLabel.text = shop[indexPath.row]
return cell
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat {
return 94.0
}
func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.001
}
func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let managerViewController = storyboard.instantiateViewControllerWithIdentifier("ResDesignerInfoViewController") as! ResDesignerInfoViewController
parentNavigationController?.pushViewController(managerViewController, animated: true)
// parentNavigationController!.pushViewController(MoreShopViewController(), animated: true)
println("탔나")
}
'Programming > Swift' 카테고리의 다른 글
tableView에서 JSon하기 (0) | 2015.05.06 |
---|---|
unbalanced calls to begin/end appearance transitions for uiviewcontroller (0) | 2015.05.05 |
xib에서 스토리보드에 있는 뷰 이동 (0) | 2015.05.04 |
xib와 xib간의 이동 (0) | 2015.05.04 |
XIB와 SWIFT파일 이어주기 (0) | 2015.04.27 |