ios - Xcode 5 中 'setDelegate' 的替换

标签 ios delegates tableview xcode5 xcode4.5

我正在尝试为我的 A 级类(class)制作一个数据库应用程序,但我无法解决这个问题;我正在通过一个 4.5 视频学习数据库技能,当我尝试对我的表使用“set delegate”时,Xcode 5 大发脾气,有解决办法吗?

- (void)viewDidLoad
{
    [super viewDidLoad];
    [[self Mytableveiw]setDelegate:self]
    [[self mytableveiw] setDataSource:self]

}

如果您能提供任何帮助,我将不胜感激。

最佳答案

你拼错了,改一下:

[[self Mytableveiw]setDelegate:self]

对此:

[[self mytableveiw]setDelegate:self]

您使用的是类的名称,而不是变量。

关于ios - Xcode 5 中 'setDelegate' 的替换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20566055/

相关文章:

ios - 如何在静态 TableViewCell 中显示 UICollectionView?

c# - Xamarin.Forms 是否适合用于大量使用 f.ex TTS、OCR、语音等的应用程序?

ios webview弹出崩溃

ios - 如何创建 UIViewController 库类?

ios - UITableViewHeaderFooterView 外观

ios - phonegap 推送插件不会在 iOS 上引发注册事件

javascript - 将 Jeditable 字段添加到 jQuery 中的委托(delegate)

ios - Monotouch : DataSource. RowSelected() 在 TableView 中选择一行时不触发

ios - 带有 Storyboard的 imageView 的 tableView?

iOS框架中的委托(delegate)方法