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?

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top