Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top