質問

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