Objective-C Question

Apple bug? UICollectionView targetContentOffsetForProposedContentOffset is not being called

I see others questions on StackOverflow saying that i need to make sure that the paging is set to off. But I have done this and still it is not called.

Is there any thing i am missing?

Here is the sample project on Github. There is no code in it at all except the code to setup a collection view.

here is the code:

func collectionView(collectionView: UICollectionView, targetContentOffsetForProposedContentOffset proposedContentOffset: CGPoint) -> CGPoint {
return proposedContentOffset

Answer Source

As stated in Apple docs,

The proposed point (in the coordinate space of the collection view’s content view) for the upper-left corner of the visible content. This represents the point that the collection view has calculated as the most likely value to use for the animations or layout update.

In other words, it's called when you delete or insert cells to collection view.