ios7 - Custom UICollectionViewLayout calls layoutAttributesForElementsInRect multiple times -


i created custom uicollectionviewlayout creates 2 dimensional grid. scrolling horizontal ant vertical works fine. there problem if test on different os.

if right or bottom border of whole uicollectionview , bounces turned on, on ios7 nothing happens. when gets ios6 every time drag uicollectionview on bounds size, method layoutattributesforelementsinrect called multiple times. causes massive lag because inside layoutattributesforelementsinrect layout enumerating views views should displayed.

does know causes problem on ios6

cache layout attributes in preparelayout. loop through them , see intersects in layoutattributesforelementsinrect. make breakpoint in layoutattributesforelementsinrect , ensure it's uikit code triggering call. if it's own code triggering call, see if can avoid triggering more necessary. in case method used uikit determine how lay out onscreen cells.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -