对成员“tableView"的不明确引用 [英] Ambiguous reference to member 'tableView'

查看:30
本文介绍了对成员“tableView"的不明确引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Code and errors Continued on the code and one more errors!

Hi, I'm new to Xcode swift. I have been doing good so far except trying to follow someone tutorial from 8.2 and I'm getting these errors that I have the hardest time understanding. Anybody who can explain what these errors means and maybe, just maybe how to fix them?

I have edited my posts, can't link more items than 2.

解决方案

You need to declare your tableView up by your other @IBOutlets since you are using a UIViewController and putting a tableView within it's view. Currently the UIViewController doesn't know what tableView you are referring too.

@IBOutlet var tableView: UITableView!

Then link it up in the interface builder as you have done with your other @IBOutlets. Make sure you link the delegate and dataSource properties of your tableView back to the view controller as well.

To do the latter, after you select your tableView, select the Connections Inspector area, as shown in the picture below, and connect them back to your UIViewController.

这篇关于对成员“tableView"的不明确引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆