是否为类似设置的应用程序自定义UITableViewCell? [英] Custom UITableViewCell for Settings-like application?

查看:73
本文介绍了是否为类似设置的应用程序自定义UITableViewCell?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的应用程序中查看设置视图.我想要类似UILabels,UISwitches之类的东西(例如在设置"应用中).

I'd like to have a settings view in my app. I want to have things like UILabels, UISwitches etc. (Like in the Settings app.)

我该怎么做?我可以只将detailView替换为所需的视图,还是可以做更多呢?这可能不起作用,因为我也需要能够设置和获取文本值.

How can I go about doing that? Can I just replace the detailView with the required view, or is there more to it then that? That may not work because I need to be able to set and get text values too.

推荐答案

看看这个项目.

如果您想自己做,可以例如将自己的视图附加到单元格的contentView上,或使用附件视图显示开关等.

If you want to do it yourself, you can e.g. attach your own views to the cell's contentView, or use the accessory view to display your switches etc.

这篇关于是否为类似设置的应用程序自定义UITableViewCell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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