开发者

Three20 - add items to launcherView after viewDidLoad

I am getting a list 开发者_开发技巧of image URLs and corresponding names at run time in my app. I would like to add these images to a TTLauncherView object that I have.

Cannot add these in loadView. I am making a call to the method for getting my data in a separate thread. Once the thread completes, I add the TTLauncherItem objects to an array and set the "pages" variable of the LauncherView.

But for some reason, the view is not updated and I don't see anything on it.

Can someone please let me know how to refresh the launcherview after adding items to it in methods other than loadView?

Thanks.


I use the following snippet to add an item to the launcherView after load.

TTLauncherItem *item = [[TTLauncherItem alloc] initWithTitle:@"NEW ITEM NAME"
                                                       image:@"NEW_ITEM_IMAGE_URL"
                                                         URL:@"NEW_ITEM_ACTION_URL"
                                                   canDelete:YES];
[_launcherView endEditing];
//add the item after ending editing to show the close x.
[_launcherView addItem:item animated:YES];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜