Three20 TTLauncherItem in a custom position

135 Views Asked by At

When I add a new TTLauncherItem icon to a TTLauncherView, this icon is set at the last position. Could I set it in another position? How should I do it?

1

There are 1 best solutions below

0
On BEST ANSWER

Subclass TTLauncherView and override...

- (void)addItem:(TTLauncherItem*)item animated:(BOOL)animated;

If you look at that method in TTLauncherView, you can see how it's getting the page to add to by using...

NSMutableArray* page = [self pageWithFreeSpace:self.currentPageIndex];

So instead of doing that you can pick the first page or whatever. Once you have the page you want to add to you can put the item wherever you want. Page is just an NSMutableArray of TTLauncherItems.