Jacob
Jacob

Reputation: 1310

Three20 Launcher adding items help? - iPhone SDK

I am using the three20 launcher to get a homescreen feel in my app. I just implemented the basic launcher. I have two things that I want to accomplish.

First off, I would like the user to push a UIButton or whatever in a DIFFERENT view controller that the TTViewController and an item be added in the launcher, how would I do this?

Secondly I would like to know how you could do a view where the user could add all the information to add their own item in the launcher? This isn't as necessary as the first thing.

I would really like to know some of this and deepen my knowledge in the three20 launcher.

Upvotes: 0

Views: 543

Answers (1)

coneybeare
coneybeare

Reputation: 33101

Just setup a way for your view controller to talk to the launcher, either by delegation, notifications or whatever you want, then add the item like this:

TTLauncherItem *item = [[TTLauncherItem alloc] initWithTitle:@"title"
                                                       image:@"http://imageURL"
                                                         URL:@"http://URL"
                                                   canDelete:YES];  
[_launcherView addItem:item animated:YES];
[item release];

Upvotes: 1

Related Questions