{"action":"closed","issue":{"url":"https://api.github.com/repos/keighl/KTCenterFlowLayout/issues/13","labels_url":"https://api.github.com/repos/keighl/KTCenterFlowLayout/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/keighl/KTCenterFlowLayout/issues/13/comments","events_url":"https://api.github.com/repos/keighl/KTCenterFlowLayout/issues/13/events","html_url":"https://github.com/keighl/KTCenterFlowLayout/issues/13","id":108239174,"number":13,"title":"iOS9 - UICollectionViewFlowLayout has cached frame mismatch for index path","user":{"login":"fwaddle","id":4109161,"avatar_url":"https://avatars.githubusercontent.com/u/4109161?v=3","gravatar_id":"","url":"https://api.github.com/users/fwaddle","html_url":"https://github.com/fwaddle","followers_url":"https://api.github.com/users/fwaddle/followers","following_url":"https://api.github.com/users/fwaddle/following{/other_user}","gists_url":"https://api.github.com/users/fwaddle/gists{/gist_id}","starred_url":"https://api.github.com/users/fwaddle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fwaddle/subscriptions","organizations_url":"https://api.github.com/users/fwaddle/orgs","repos_url":"https://api.github.com/users/fwaddle/repos","events_url":"https://api.github.com/users/fwaddle/events{/privacy}","received_events_url":"https://api.github.com/users/fwaddle/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-25T00:21:35Z","updated_at":"2015-09-27T12:35:07Z","closed_at":"2015-09-27T12:35:07Z","body":"Hi,\r\n\r\nAfter a recent upgrade to iOS9, I started seeing this warning on the console:\r\n\r\nUICollectionViewFlowLayout has cached frame mismatch for index path <NSIndexPath: 0xc000000000000016> {length = 2, path = 0 - 0} - cached value: {{9.75, 0}, {55, 65}}; expected value: {{0, 0}, {55, 65}}\r\nThis is likely occurring because the flow layout subclass KTCenterFlowLayout is modifying attributes returned by UICollectionViewFlowLayout without copying them\r\n\r\nChanging :\r\n`NSMutableArray *superAttributes = [NSMutableArray arrayWithArray:[super layoutAttributesForElementsInRect:rect]];`\r\n\r\nto\r\n\r\n`NSMutableArray *superAttributes = [NSMutableArray arrayWithArray:[super layoutAttributesForElementsInRect:rect].copy];`\r\n\r\nFixed the issue.\r\n\r\nHope that helps."}}