开发者

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 cou开发者_Python百科ld 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.


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];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜