views:

332

answers:

3

Hi guys,

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)

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 :)

A: 

Hi there how are you? in fact i am facing the same problem as you. Any luck so far? I am storing images in mysqlite table (BLOB).

Any help , thank you very much. And if anything comes up i will keep you updated.

Veer
nothing so far. keep me updated ;)
choise
A: 

Hello Good morning,

I have ran out in the same issue as i told u 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.

Veer
where do you store your items? what if a user arranges the items in a new way? you know what i mean?
choise
ideally it would be stored in a table DB. So when the uses re arrange the items, it will be updated in the table,meaning :1. everytime the app is launched : loadview(){checkitemsdb();}so ideally the table items would consist of :idfunctionnameimageindex ---> position of the item.Does that sounds good ? Pls note as far i didnt implemented teh re arrange items.}
Veer
so i finally solved positioning, arranging and storing my items. will post my answer later this day.
choise
A: 

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.

choise