TTLauncherView detect page change

21 views
Skip to first unread message

Peter

unread,
Nov 19, 2010, 5:06:36 AM11/19/10
to Three20
Hi guys,

I would love to have the TTLauncherViewDelegate added one more method
to detect, when the page changed. To do some updates on the launcher
items on the new page.

-(void)launcherView:(TTLauncherView*)launcherView changedPageToIndex:
(NSUInteger)pageIndex

For the meanwhile I subclassed TTLauncherView and added the method

- (void)pageChanged {
[super pageChanged];
if ([_delegate
respondsToSelector:@selector(launcherView:changedPageToIndex:)]) {
[_delegate launcherView:self
changedPageToIndex:_pager.currentPage];
}
}

Peter

unread,
Nov 19, 2010, 5:26:37 AM11/19/10
to Three20
Ohh .... I posted this a little too early. I figured out that the
pageChanged method in the TTLauncherView is not invoked on a page
change. Strange ...

Peter

unread,
Nov 19, 2010, 5:33:27 AM11/19/10
to Three20
Instead of subclassing the method -(void)pageChanged, which is never
invoked, one should subclass the method -
(void)updatePagerWithContentOffset:(CGPoint)contentOffset.
Sorry for this messy post.

PEZ

unread,
Jan 9, 2011, 10:08:21 AM1/9/11
to thr...@googlegroups.com
But thanks for posting it! It was driving me a bit nuts.
Reply all
Reply to author
Forward
0 new messages