पर फोकस ट्रिगर स्क्रॉलिंग अक्षम करें क्या सेल पर ध्यान केंद्रित होने पर UICollectionView
की स्वत: स्क्रॉलिंग को अक्षम करने का कोई तरीका है? जब मैं फोकस में आता हूं तो मैं मैन्युअल रूप से सेल की सामग्री ऑफसेट को समायोजित करना चाहता हूं।UICollectionView
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context
withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator
{
[coordinator addCoordinatedAnimations:^
{
[UIView animateWithDuration:[UIView inheritedAnimationDuration]
animations:^
{
// Move next focused cell.
if ([context.nextFocusedView isKindOfClass:[YBZEventCollectionViewCell class]])
{
UICollectionViewCell *cell = (UICollectionViewCell *)context.nextFocusedView;
CGPoint offset = CGPointMake(CGRectGetMinX(cell.frame), 0.0f);
[_collectionView setContentOffset:offset];
}
}];
} completion:nil];
}
यह काम करता है लेकिन जब से ध्यान देने के इंजन भी मेरे सेल ले जाता है (स्क्रॉल यह) मैं एनीमेशन जो चिकनी नहीं है के साथ खत्म हो, वहाँ है एक:
मैं सामग्री को अद्यतन करने में ऑफसेट wan't इसके अंत में "किक"।
क्षमा करें, मैं तुम्हें मेरे सवाल का गलत समझा लगता है। मैंने कुछ और कोड पोस्ट किया। मुझे एक संग्रह दृश्य होना है जो एक सेल से दूसरे सेल पर फोकस करते समय स्वचालित रूप से सामग्री ऑफसेट को अपडेट नहीं करता है। मैं सामग्री को अपने आप मैन्युअल रूप से मैनिपुलेशन ऑफसेट करना चाहता हूं। – RaffAl