Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

erdinc27

macrumors regular
Original poster
Jul 20, 2011
168
1
i have a UICollectionView(detailCollectionView) and a View that contains 3 labels inside. What i want to do is when the collectionView finishes scrolling then i will change the contents of these labels. here what i have done
Code:
- (void) scrollViewDidEndDecelerating:(UIScrollView *)scrollView {

    
    [UIView animateWithDuration:0.2 animations:^{
        
        [self changeTheLabelTexts:@"CAtegori" baslik:@"Title" icerik:@"Description"];
        
        self.containerView.alpha = 1.0;
    }];
    
}

- (void) changeTheLabelTexts:(NSString *)kategori baslik:(NSString *)baslik icerik:(NSString *)icerik {
    
    self.lblAciklama.text = icerik;
    self.lblBaslik.text = baslik;
    self.lblKategori.text = kategori;
    
}

when i run it collectionView scrolls but it comes back to the start position ? what can be wrong here ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.