What you experience has to do how commands are performed and results especially regarding KVO and such are available after the current runloop finishes. In your case the dot-notation of self.theCollectionView.representedObject = self.representedObject ;
hides a KVO call of setRepresentedObject:
which automatically gets enclosed in willChangeValueForKey:
and didChangeValueForKey:
calls. That maybe explains better, why the new representedObject and thus the new view contents isn't available at the moment you run the command but only after the runloop finishes (explanation is more complex!).
Thus with afterDelay:
the command is executed after the current runloop finishes and only then the view is filled and top can be reached. This sometimes can be annoying since it seems to break the logical flow. Yet, it is absolutely valid.