开发者

dynamically add Items to TTLauncher

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.

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)开发者_StackOverflow

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?

Thanks for help :)


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.

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


I have ran out in the same issue as I told you earlier: so

  1. You store your additional icons in a table.

on LoadView()

you try to use a dynamic array like this:

_launcherView.pages = [NSArray arrayWithObjects: dynamicArr1];

Where your dynamic Array is filled like this:

caching of images of each icon here:

http://groups.google.com/group/three20/msg/66ec114401af3b06

[dynamicArr1 insertObject:[[[TTLauncherItem alloc] initWithTitle:name
                                                                              image:name
                                                                                URL:url canDelete:YES] autorelease] atIndex:i];

Let me know if that's what you were looking for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜