动态添加项到TTLauncher [英] dynamically add Items to TTLauncher

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

问题描述

在我的应用程序,我得到一个TTLauncher对象与一些TTLauncherItems。
现在我想通过按一个按钮在我的应用程序中动态添加一些项目。

in my app i got a TTLauncher Object with some TTLauncherItems in it. Now i want to add some Items dynamically inside my App by pressing a button.

有一个简单的方法来做,或者我必须创建我的自己的方法?
在原来的facebook应用程序已经有类似的实现。 (您可以将您的朋友添加到启动器)

Is there a simple way to do that or do i have to create my own methods? In the original facebook application there is already something like that implemented. (You can add your Friends to the Launcher)

如果没有,最好的做什么呢?

If not, what would be the best thing to do something like that? Store all "extra items" in a plist oder even in a database and query them, each time TTLauncher object is initialized?

感谢您的帮助:)

推荐答案

所以我最后使用一个简单的plist来存储我的项目。
每次我的项目获得新的排列或项目被添加,我更新我的plist与这个新的数据。当视图被初始化时,我从我的plist建立所有这些项目。

so i finally used a simple plist to store my items. every time my items get new arranged or an item gets added, i update my plist with this new data. when the view gets initialised, i building all this items out of my plist.

一个更好的方法是将它存储在数据库中我想,但对我来说, plist就够了。

a better way would be to store it in a database i think, but for me, a plist is enough.

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

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