将SDNestedTable添加到子视图 [英] Add SDNestedTable to a subview

查看:66
本文介绍了将SDNestedTable添加到子视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,其他程序员,

我想知道如何将SDNestedTable添加到我的项目中。

I am wondering how to add the SDNestedTable into a project of mine.

以下是SDNestedTable的源代码:

Here is the source code for the SDNestedTable:

https://github.com/serverdensity/ios-SDNestedTable

我想将此表添加到我的一个XIB的子视图中项目。

I would like to add this table to a subview of one of my XIB's in my project.

谢谢,希望有人可以帮助我! :)

Thanks, hopefully someone can help me out! :)

推荐答案

如果您将UITableView添加到您的XIB文件,然后单击第二个选项卡(右侧面板)并在使类成为SDNestedTable而不是你的UITableView所以它使它成为那个类,假设SDNestedTable是UITableViewController的子类。

If you add a UITableView to your XIB file, then click on the second tab (right side panel) and in that make the class the SDNestedTable rather than your UITableView so it makes it that class instead, assuming also that SDNestedTable is a subclass of UITableViewController.

你应该能够再添加将您的属性添加到.h文件并将其附加到您的XIB中:

You should be able to then add your property to your .h file and attach it in your XIB:

@property(nonatomic, weak)IBOutlet SDNestedTable *nestedTable;

并且在你的.m文件中将使用你需要的所有委托方法,它们也列在底部您提供的github链接,类似于UITableView以及我们想象的dataSource和委托方法。

and in your .m file will go all the delegate methods you need that are also listed at the bottom of the github link you've provided, similarly to a UITableView and the dataSource and delegate methods they have I would imagine.

这篇关于将SDNestedTable添加到子视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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