title: Everytime playing last audio files in UICollectionview
body: <pre><code>    - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
      {
          return Arr_Audio.count;
      }
      - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
      {
          UICollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"CellAudio" forIndexPath:indexPath];
  
          UIView *view =[[UIView alloc]initWithFrame:CGRectMake(0, 0, 150, 150)];
          NSURL *url= [NSURL URLWithString:[Arr_Audio objectAtIndex:indexPath.row]];
  
          // create a player view controller
          avplayer = [AVPlayer playerWithURL:url];
          controller.view.frame = CGRectMake(0,0,150,150);
          controller.player = avplayer;
          controller.showsPlaybackControls = NO;
          avplayer.closedCaptionDisplayEnabled = NO;
          [avplayer pause];
  
  
          [view addSubview:controller.view];
          [cell addSubview:view];
  
  
              playButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 150, 150)];
              [playButton setImage:[UIImage imageNamed:@"ic_audio.png"] forState:UIControlStateNormal];
              [playButton addTarget:self action:@selector(playPauseSelector:) forControlEvents:UIControlEventTouchUpInside];
              [cell addSubview:playButton];
  
              return cell;
      }
  
  - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
  {
  
      _Audio_arr =[Arr_Audio objectAtIndex:indexPath.row];
      _i=indexPath.row;
  }
  
  
  
   // now how to play selected audio at collecion view.?
  -(void)playPauseSelector:(UIButton *)button
  {
      if (playValue)
      {
          //set pause image for button
          [playButton setImage:[UIImage imageNamed:@"ic_audio.png"] forState:UIControlStateNormal];
  
          [avplayer pause];
      }
      else
      {
          //set play image for button
          [playButton setImage:[UIImage imageNamed:@"ic_playing.png"] forState:UIControlStateNormal];
          [avplayer play];
      }
      playValue = !playValue;
  }
  </code></pre>
  
  <p>Please tell me that how to play each audio for each cell. It is playing the last audio every time.</p>