数组随机播放

时间:2015-11-20 06:23:20

标签: objective-c iphone arrays ios8 nsmutablearray

我有一个tableView,其中section的节头视图。节的标题视图中有水平Scrollview,其中load数组元素的任何计数。

My concern is on My first section array element look like
0 Section - 0,1,2,3
1 Section - 1 ,2,3,0
2 Section - 2,3,0,1
3 Section - 3,0,1,2
. I am using

       for (NSUInteger i = section ; i > 0; i--)
            {
                [self exchangeObjectAtIndex:i withObjectAtIndex: [appDelegate.addArray count]-i];
            }
    - (void)exchangeObjectAtIndex:(NSUInteger)idx1
    withObjectAtIndex:(NSUInteger)idx2
    {
        NSLog(@"%d",idx1-1);
         NSLog(@"%d",idx2);
        [appDelegate.addArray exchangeObjectAtIndex:idx1-1 withObjectAtIndex:idx2-1];
    }

他们给出问题,因为当我们滚动表数组内容更改时。请帮忙。

0 个答案:

没有答案