I have two subclasses of Can one be the only focused behavior without really selecting the cell? I have tried to call different code without any success to To be more clear, I have to do something without modifying the code of the cell> selected property: This is what I already have: OK: But if I leave This is not ok (animation waving type): Edit (The answer has been changed after further explanation) I did the same as Table View. In fact, you call You also need to override the UICollectionView and
UICollectionViewFlowLayout . When a cell is selected, I call
setCollectionViewLayout: animated: to switch between layouts. After the transition, the selected cell is centered, which is fine.
setContentOffset: animated: Alternatively, do I have a self-defined
contentoffset for the layout to display Can I specify?
Edit # 1
[Self.collectionView selectItemAtIndexPath: Animated Pathway: No Scrollposition: UICollectionViewScrollPositionNone]; [Self.collectionView Setting ViewLayout: Animated Layout: Yes];
selectItemAtIndexPath :
< Code> [self. View Collection View Selection: Layout Animated: Yes]; [Self-crawlWall ScrollWives: TargetFrom Animated: Yes];
scrollRectToVisible: Animated: Calculating a reset, it will be located at the place of your scroll view where you want to end it, for the exact positioning, I think that according to your view It is necessary to calculate the same size, note that if the size of the material is changing, then the blank should be calculated in the expected final material size. = [With something like this:
layoutAttributesForElementsInterecting: rect Super LayoutsAuthentalFormatsSearch: Rect;); If (& lt; test is that we want to make strangers & gt;) {UICollectionViewLayoutAttributes * pose = poses [& lt; To modify the currency of the index & gt;]; Pose.frame = & lt; Some other frames & gt ;; // modify the frame, for example} return pauses; }
layout atvartharthore ITMATI and XPpath with similar logic. When you want to make changes, the next layout will have to invalidate or change your layout. The layout must be given to you, the layout should know what to do, so you can pass relevant data to it or expand
UICollectionViewDelegateFlowLayout1 .
No comments:
Post a Comment