Domanda

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?

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top