-1
からNSIntegerコレクションビューからIOSのはNSIndexpath
- (void)buttonPressed:(id)sender
{
NSLog(@"button clicked");
// CGPoint buttonPosition = [sender convertPoint:CGPointZero
// toView: GlossaryCollView];
NSIndexPath *centerCellIndexPath =
[self.GlossaryCollView indexPathForItemAtPoint:
[self.view convertPoint:[self.view center] toView:self.GlossaryCollView]];
NSLog(@"cell index path :%@",centerCellIndexPath);
}
を選択したセルの位置を取得していこれは、値のNSLog = {1長= 2、パス= 0}を与え得ますパスの最初の値..どのように私はそれを得ることができますか?私はこのコードを使用して最後の値を取得することができます
..
NSUInteger lastIndex = [centerCellIndexPath indexAtPosition:[centerCellIndexPath length] - 1];
いい仕事をしています... –