Danyal Aytekin
Danyal Aytekin

Reputation: 4215

Collection view controller's viewDidLayoutSubviews is being called repeatedly in iOS 7

I have a collection view controller with a vertical flow layout, which has some custom layout attributes to warp it into a semicircle, but is otherwise fairly normal. Under iOS 6, viewDidLayoutSubviews is called precisely twice, once when the view is initialised, and again after it has got its data. But under iOS 7, it is then getting called repeatedly whenever the collection view scrolls, whether with finger down or under its own momentum. It looks like it could be once per didscroll. Does anybody know the reason why this might be happening in 7?

Upvotes: 3

Views: 4370

Answers (1)

Danyal Aytekin
Danyal Aytekin

Reputation: 4215

Ok so according to this post by nickman55 on the Apple forums, viewDidLayoutSubviews is called in iOS 7 whenever a collection view cell is reused. https://devforums.apple.com/message/874718#874718

Upvotes: 8

Related Questions